Some of our production JCL executes Db2 programs via a Clist routine (using IKJEFT1B) and JCLCheck therefore can't validate the existence of the Db2 program.
e.g.
//STEP010 EXEC PGM=IKJEFT1B,
// PARM=('%DB2BATCH','SYS(DB21)','PROG(DBPGM1)',
// 'PLAN(DBPLN1)')
So I thought I'd write some JCLCheck Rexx code to firstly extract the Db2 progam name from the parms input to the Clist, that works ok (variable Db2_pgm contains the program name). I then thought I'd extract the load lib from the STEPLIB DD and combine it with the Db2 program name and use the Sysdsn function to see if the member existed in the loadlib.
This is the code -
DD_PROCESSING:
If DD.NAME = 'STEPLIB' & Db2_pgm <> '' then do
DD.DSN = Strip(DD.DSN)
check_pgm = DD.DSN'('Db2_pgm')'
x = Sysdsn("'"check_pgm"'")
If x = 'OK' then Db2_pgm_exists = 'Y'
End
Return
When I try to run JCLCheck in batch, with Db2 job JCL as input, using this Rexx I get the following error -
136 +++ x = Sysdsn("'"check_pgm"'")
34 +++ CALL DD_PROCESSING
IRX0043I Error running SYNTAX02, line 136: Routine not found
Is there a way to use the Sysdsn function in the JCLCheck Rexx?
Or is there another way to validate the existence of the load module using a method that does work?