Checking for the JCLLIB statement from a REXX exec
search cancel

Checking for the JCLLIB statement from a REXX exec

book

Article ID: 53572

calendar_today

Updated On:

Products

JCLCheck Workload Automation

Issue/Introduction


In addition to the Assembler user exits, the CA JCLCheck Workload Automation REXX interface is provided to allow for further standardization of JCL.  This Knowledge Document provides an example of how to check for the JCLLIB statement in a REXX exec procedure.



Resolution

Sample JCL:

//JOB1    JOB (100000000),'ACCOUNT INFO',MSGCLASS=X,CLASS=K
//      JCLLIB ORDER=HLQ.SYSDEV.PROCLIB
//STEP1 EXEC MYPROC
//

Add the following codes to the DD_PROCESSING routine in the CA sample REXX exec ?CAZ1REXX' from the CAIOPTN data set:

 If  dd.ddname = 'JCLLIB' Then                                          
     Do
         Call $CAJCL_ERROR,                                               
         'E','JCLLIB statement not allowed in the JCL and will be ignored?         
     End                                                                
Return

The above codes will cause an error message 'CAY6341E JCLLIB statement not allowed in the JCL and will be ignored' when a JCLLIB statement is found in the validating JCL.