Flag missing JCLLIB statement using CA JCLCheck using CAZ1REXX

Document ID : KB000126427
Last Modified Date : 08/02/2019
Show Technical Document Details
Introduction:
You can use CAZ1REXX to produce an error message if a JCLLIB statement is not present in the JCL.
Instructions:
Use the hlq.CAZ2CLS0 member CAZ1REXX and add the following statements:

In the JOB_PROCESSING section, set the the flag to N.
JOB_PROCESSING:   
 JCLLIB = N       


In the DD_PROCESSING section, set the flag to Y if JCLLIB statement is found
DD_PROCESSING:     
If DD.DDNAME = 'JCLLIB' then do   
  JCLLIB = Y      
End


In the END_JOB_PROCESSING section, issue a message if the flag for JCLLIB flag is still N
END_JOB_PROCESSING:                       
 If  JCLLIB = N Then do                 
    Call $CAJCL_ERROR 'E',                
    'PLEASE ADD MISSING JCLLIB STATEMENT' 
End      
                                

This will produce the following error message:
CAY6341E  'PLEASE ADD MISSING JCLLIB STATEMENT'