SQL Queries - CAST Knowledge Base - Queries on objects - How to list External Objects

Purpose of Query

This document provide a set of queries to get objects considered as external (not counted in metric computation).

You may want to select them by object type, or by execution unit.

The table that contains this piece of information is OBJPRO. The info is then duplicated into table CDT_OBJECTS during Cast System Views computation.

Applicable CAST Version

ReleaseYes/No
8.3.x
8.2.x

Applicable RDBMS

RDBMSYes/No
Oracle Server
Microsoft SQL Server
CSS

Query for CSS

Query to find all external objects of a certain type : the example below gives all the external Java classes - the value of 1 for o.Prop is the indication that the object is external:

 SELECT *
 FROM   KEYS k,
        OBJPRO o
 WHERE  k.IdKey = o.IdObj
 AND    o.Prop  = 1
 AND    k.ObjTyp IN ( 100,
                     989 ) -- java classes and generic java classes

Query result example

4099;“URLEncoder”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";4099;385008;1
911;“HttpServlet”;"";“XXXXXX”;-1;5040;8388642;100;"???";“1970-01-01 00:00:00”;"";0;"";911;385000;1
1167;“WhenTagSupport”;"";“XXXXXX”;-1;5040;8388642;100;"???";“1970-01-01 00:00:00”;"";0;"";1167;385006;1
840156;“KmaEjbException”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";840156;385004;1
346263;“RequestMappingHandlerMapping”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";346263;385010;1
164882;“FileOutputStream”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";164882;385002;1
161876;“ImportAttributeTag”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";161876;384992;1
367385;“ThreadPoolExecutor”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";367385;385010;1
9055;“ForEachTag”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";9055;385010;1
9241;“TransformTag”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";9241;385010;1
1512;“ContentAttachmentLinksDocumentImpl”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";1512;384994;1
8770;“NumberFormatException”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";8770;385002;1
166104;“PageTagExtraInfo”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";166104;384992;1
7510;“PropertySourcesPlaceholderConfigurer”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";7510;385010;1
840433;“JndiNames”;"";“XXXXXX”;-1;5040;8388626;100;"???";“1970-01-01 00:00:00”;"";0;"";840433;385000;1
367908;“IndexOutOfBoundsException”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";367908;385010;1
1575;“SpecificElementImpl”;"";“XXXXXX”;-1;5040;8388626;100;"???";“1970-01-01 00:00:00”;"";0;"";1575;384994;1
8722;“ByteArrayOutputStream”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";8722;384994;1

Query result interpretation

The applicatiion refers to these classes in the JAR files from the classpath

Query for Oracle

Query to find all external objects of a certain type : the example below gives all the external Java classes

SELECT *
 FROM   KEYS k,
        OBJPRO o
 WHERE  k.IdKey = o.IdObj
 AND    o.Prop  = 1
 AND    k.ObjTyp IN ( 100,
                     989 ) -- java classes and generic java classes

Query result example

4099;“URLEncoder”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";4099;385008;1

911;“HttpServlet”;"";“XXXXXX”;-1;5040;8388642;100;"???";“1970-01-01 00:00:00”;"";0;"";911;385000;1
1167;“WhenTagSupport”;"";“XXXXXX”;-1;5040;8388642;100;"???";“1970-01-01 00:00:00”;"";0;"";1167;385006;1
840156;“KmaEjbException”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";840156;385004;1
346263;“RequestMappingHandlerMapping”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";346263;385010;1
164882;“FileOutputStream”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";164882;385002;1
161876;“ImportAttributeTag”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";161876;384992;1
367385;“ThreadPoolExecutor”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";367385;385010;1
9055;“ForEachTag”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";9055;385010;1
9241;“TransformTag”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";9241;385010;1
1512;“ContentAttachmentLinksDocumentImpl”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";1512;384994;1
8770;“NumberFormatException”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";8770;385002;1
166104;“PageTagExtraInfo”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";166104;384992;1
7510;“PropertySourcesPlaceholderConfigurer”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";7510;385010;1
840433;“JndiNames”;"";“XXXXXX”;-1;5040;8388626;100;"???";“1970-01-01 00:00:00”;"";0;"";840433;385000;1
367908;“IndexOutOfBoundsException”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";367908;385010;1
1575;“SpecificElementImpl”;"";“XXXXXX”;-1;5040;8388626;100;"???";“1970-01-01 00:00:00”;"";0;"";1575;384994;1
8722;“ByteArrayOutputStream”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";8722;384994;1

Query result interpretation

The applicatiion refers to these classes in the JAR files from the classpath

Query for SQL server

Query to find all external objects of a certain type : the example below gives all the external Java classes

SELECT *
 FROM   KEYS k,
        OBJPRO o
 WHERE  k.IdKey = o.IdObj
 AND    o.Prop  = 1
 AND    k.ObjTyp IN ( 100,
                     989 ) -- java classes and generic java classes

Query result example

4099;“URLEncoder”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";4099;385008;1

911;“HttpServlet”;"";“XXXXXX”;-1;5040;8388642;100;"???";“1970-01-01 00:00:00”;"";0;"";911;385000;1
1167;“WhenTagSupport”;"";“XXXXXX”;-1;5040;8388642;100;"???";“1970-01-01 00:00:00”;"";0;"";1167;385006;1
840156;“KmaEjbException”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";840156;385004;1
346263;“RequestMappingHandlerMapping”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";346263;385010;1
164882;“FileOutputStream”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";164882;385002;1
161876;“ImportAttributeTag”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";161876;384992;1
367385;“ThreadPoolExecutor”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";367385;385010;1
9055;“ForEachTag”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";9055;385010;1
9241;“TransformTag”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";9241;385010;1
1512;“ContentAttachmentLinksDocumentImpl”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";1512;384994;1
8770;“NumberFormatException”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";8770;385002;1
166104;“PageTagExtraInfo”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";166104;384992;1
7510;“PropertySourcesPlaceholderConfigurer”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";7510;385010;1
840433;“JndiNames”;"";“XXXXXX”;-1;5040;8388626;100;"???";“1970-01-01 00:00:00”;"";0;"";840433;385000;1
367908;“IndexOutOfBoundsException”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";367908;385010;1
1575;“SpecificElementImpl”;"";“XXXXXX”;-1;5040;8388626;100;"???";“1970-01-01 00:00:00”;"";0;"";1575;384994;1
8722;“ByteArrayOutputStream”;"";“XXXXXX”;-1;5040;8388610;100;"???";“1970-01-01 00:00:00”;"";0;"";8722;384994;1

Query result interpretation

The applicatiion refers to these classes in the JAR files from the classpath

Query for CSS

Query to find all external objects for a certain execution unit

 SELECT *
  FROM   KEYS k  ,
         OBJPRO o,
         ANAPRO a
  WHERE  k.IdKey  = o.IdObj
  AND    o.Prop   = 1
  AND    a.IdPro  = o.IdPro
  AND    a.ProNam = '<Execution Unit Name>'

Query result example

6403;“IEFBR14”;"";“XXXXXX”;-1;14080;0;139145;"???";“1970-01-01 00:00:00”;"";0;"";6403;3805;1;2622153;0;826;“MF_13592”;"";3805

7419;“IDCAMS”;"";“XXXXXX”;-1;14080;0;139145;"???";“1970-01-01 00:00:00”;"";0;"";7419;3805;1;2622153;0;826;“MF_13592”;"";3805
7420;“IMSBATCH”;"";“XXXXXX”;-1;15100;0;139147;"???";“1970-01-01 00:00:00”;"";0;"";7420;3805;1;2622153;0;826;“MF_13592”;"";3805
7469;“IKJEFT01”;"";“XXXXXX”;-1;14080;0;139145;"???";“1970-01-01 00:00:00”;"";0;"";7469;3805;1;2622153;0;826;“MF_13592”;"";3805

Query result interpretation

Objects in Execution unit “MF_13592” refer to these external objects

Query for Oracle

Query to find all external objects for a certain execution unit

 SELECT *
  FROM   KEYS k  ,
         OBJPRO o,
         ANAPRO a
  WHERE  k.IdKey  = o.IdObj
  AND    o.Prop   = 1
  AND    a.IdPro  = o.IdPro
  AND    a.ProNam = '<Execution Unit Name>'

Query result example

6403;“IEFBR14”;"";“XXXXXX”;-1;14080;0;139145;"???";“1970-01-01 00:00:00”;"";0;"";6403;3805;1;2622153;0;826;“MF_13592”;"";3805

7419;“IDCAMS”;"";“XXXXXX”;-1;14080;0;139145;"???";“1970-01-01 00:00:00”;"";0;"";7419;3805;1;2622153;0;826;“MF_13592”;"";3805
7420;“IMSBATCH”;"";“XXXXXX”;-1;15100;0;139147;"???";“1970-01-01 00:00:00”;"";0;"";7420;3805;1;2622153;0;826;“MF_13592”;"";3805
7469;“IKJEFT01”;"";“XXXXXX”;-1;14080;0;139145;"???";“1970-01-01 00:00:00”;"";0;"";7469;3805;1;2622153;0;826;“MF_13592”;"";3805

Query result interpretation

Objects in Execution unit MF_13592 refer to these external objects

Query for SQL server

Query to find all external objects for a certain execution unit

 SELECT *
  FROM   KEYS k  ,
         OBJPRO o,
         ANAPRO a
  WHERE  k.IdKey  = o.IdObj
  AND    o.Prop   = 1
  AND    a.IdPro  = o.IdPro
  AND    a.ProNam = '<Execution Unit Name>'

Query result example

6403;“IEFBR14”;"";“XXXXXX”;-1;14080;0;139145;"???";“1970-01-01 00:00:00”;"";0;"";6403;3805;1;2622153;0;826;“MF_13592”;"";3805

7419;“IDCAMS”;"";“XXXXXX”;-1;14080;0;139145;"???";“1970-01-01 00:00:00”;"";0;"";7419;3805;1;2622153;0;826;“MF_13592”;"";3805
7420;“IMSBATCH”;"";“XXXXXX”;-1;15100;0;139147;"???";“1970-01-01 00:00:00”;"";0;"";7420;3805;1;2622153;0;826;“MF_13592”;"";3805
7469;“IKJEFT01”;"";“XXXXXX”;-1;14080;0;139145;"???";“1970-01-01 00:00:00”;"";0;"";7469;3805;1;2622153;0;826;“MF_13592”;"";3805

Query result interpretation

Objects in Execution unit MF_13592 refer to these external objects

Notes/comments

Related Pages