Detecting Programs Started by Driver Utilities

Batch applications often use jobs to launch driver utilities that start other programs. If you want to model the relationship between jobs and these kinds of programs, you need to define entries that identify the programs in the <JCL> <BatchProgs> section of \<Enterprise Analyzer Home>\Data\Legacy.xml.

<BatchProgs> entries have the form:

<item> <driver_utility>,PARM|DD*|DSN,<search_value> 

where:

Tip: The <BatchProgsNames> section of Legacy.xml contains patterns you can use to filter program names from other input data. Use <Accept> to specify patterns for valid program names, <Except> for invalid program names. For example: <Accept> ^([A-Z]\w{4,7})$ </Accept>.

Using the PARM Option

The PARM option searches for the name of the program of interest in the PARM= parameter of the EXEC statement. You can also use it to find the PSB name for an IMS application. The syntax is:

PARM,<prg_parm_num>[,%P,<psb_parm_num>,%B]  

where:

  • <prg_parm_num> is the number of the parameter that specifies the program name.
  • <psb_parm_num> is the number of the parameter that specifies the PSB name.

The value is either a string literal, with parameters separated by blanks or by commas, or a list of comma-separated parameters enclosed in brackets.

For example, the entry:

<item> IKJEFT01,PARM,3 </item>

identifies the programs APPPRG1 and APPPRG in the following code fragment:

//step1    EXEC PGM=IKJEFT01,
//              PARM='APP DB2P APPPRG1 APPPRG1L'
//SYSTSIN  DD DUMMY,DCB=BLKSIZE=80                     

//step2    EXEC PGM=IKJEFT01,REGION=2048K,DYNAMNBR=20,
//              PARM=('APP',DB2P,APPPRG2,APPPRG2L)
//SYSTSIN  DD DUMMY,DCB=BLKSIZE=80

For IMS:

<item> DFSRRC00,PARM,2,%P,3,%B </item>

identifies the program IMSPRG1 and the PSB PSBM1 in the following code fragment:

//           EXEC PGM=DFSRRC00,REGION=2048K,                              
//           PARM=(DLI,IMSPRG1,PSBM1,7,0000,,0,,N,0,T,0,,N,,,N) 

Using the DD* Option

The DD* option searches for the name of the program of interest in the instream data of a DD statement. You can also use it to find Natural library names. The syntax is:

DD*,<dd_name>,<search_string>[%L] %P[+] [,%?]  

where:

  • <dd_name> is the name of the DD statement.
  • <search_string> is the string to match. Matched code can appear on different lines in the source.
  • %L specifies the position of the Natural library name relative to the matched string.
  • %P specifies the position of the program name relative to the matched string. %P+ indicates that multiple program names are at the specified position.
  • %? specifies the position relative to the matched string of the program name to be ignored by the parser.
    Note: So <item> IKJEFT01,DD*,SYSTSIN,PARMS('%?,%?,%P) </item> matches only BF4P422 in the code fragment PARMS ('BF422DA1,STEP1,BF4P422 /').

For example, the entry:

<item> IKJEFT01,DD*,SYSTSIN,RUN PROGRAM(%P) </item>

identifies the programs MYPRG1 and MYPRG3 in the following code fragment:

//step4   EXEC PGM=IKJEFT01
//SYSTSIN  DD *                                                                 
RUN PROGRAM(MYPRG1) qqq
/*

//step5    EXEC PGM=IKJEFT01
//SYSTSIN  DD *                                                                 
PROFILE    PREFIX(C34)                                                      
DSN SYSTEM(DSN)  RETRY(0) TEST(0)                                               
RUN 
PROGRAM(MYPRG3) PLAN(MYPLAN) -                                          
  LIB('CO737.PDS.MCPBR2.LOAD') -

For Natural:

<item> ADANATV3,DD*,CMSYNIN,LOGON %L %P+ </item>

identifies the library MYLIB and the programs MYNAT1 and MYNAT2 in the following code fragment:

//S040   EXEC PROG=ADANATV3
//CMSYNIN  DD *                                                                
LOGON MYLIB                                                                    
MYNAT1
MYNAT2

Using the DSN Option

The DSN option searches for the name of the program of interest in the DSN name of a DD statement. The syntax is:

DSN,<dd_name>,<search_string>%P  

where:

  • <dd_name> is the name of the DD statement.
  • <search_string> is the string to match.
  • %P specifies the position of the program name relative to the matched string.

For example, the entry:

<item> IKJEFT01,DSN,SYSTSIN,RUNCARDS(%P) </item>

identifies the programs PROG1 and PROG2 in the following code fragment:

///step8   EXEC PGM=IKJEFT01
//SYSTSIN  DD DSN=SYS.DP.TE.RUNCARDS(PROG1),DISP=SHR 

//step9  EXEC PGM=IKJEFT01
//SYSTSIN  DD DSN=RUNCARDS(PROG2),DISP=SHR