Flag JCLLIB statement with an error using the JCLCheck REXX interface
search cancel

Flag JCLLIB statement with an error using the JCLCheck REXX interface

book

Article ID: 53572

calendar_today

Updated On:

Products

JCLCheck Workload Automation

Issue/Introduction

Use the JCLCheck REXX interface to produce an error message if a JCLLIB statement is present in the JCL.

Environment

Release: 12.0

Component: JCLCheck Workload Automation

Resolution

Sample JCL with JCLLIB statement:

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

Add the following codes to the DD_PROCESSING routine:  

 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 produce error message 'CAY6341E JCLLIB statement not allowed in the JCL and will be ignored' when a JCLLIB statement is found in the validating JCL.

Additional Information

Two sample REXX execs are located in the JCLCheck CAZ2CLS0 library.  The members are CAZ1REXX, and CAZ1REX2.