JCLCheck

 View Only

 Sysdsn Routine not found

JOHN WRIGHT's profile image
JOHN WRIGHT posted Jun 30, 2022 07:06 AM
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?
Quynh Pham's profile image
Broadcom Employee Quynh Pham
Hello John,
I suggest using CAZ2LPDS.  It is documented here:  
https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-jclcheck-workload-automation/12-0/building/list-pds-members-with-caz2lpds.html

If this does not work for you, please open a case and we'll address it.

Thank you.
Kiki.pham@broadcom.com
Quynh Pham's profile image
Broadcom Employee Quynh Pham
Please note: CAZ2LPDS can handle a loadlib.  In other words, the PDS LRECL does not have to be 80.   We will update the manual with this information.
Example: 
//STEPNAME EXEC PGM=CAZ2LPDS,REGION=0K
//SYSIN DD DISP=SHR,DSN=CAI.JCK.R12.LOAD
//SYSPRINT DD SYSOUT=*

will return a member list from DSN=CAI.JCK.R12.LOAD

Kiki.pham@broadcom.com