JCLCheck REXX - how to issue a message when a statement is found in the JCL
search cancel

JCLCheck REXX - how to issue a message when a statement is found in the JCL

book

Article ID: 198394

calendar_today

Updated On:

Products

JCLCheck Workload Automation

Issue/Introduction

Need to scan the validating JCL, and report on specific words (ex: abcde).   

Environment

Release : 12.0

Component : JCLCheck Workload Automation

Resolution

Add the following codes:  

1.  Set a flag in INITIAL_PROCESSING:  section 

         flag=N

2.  In the END_JOB_PROCESSING:   section, establish if the flag has been set  

IF flag = 'N' then do                                              
    Call $CAJCL_ERROR 'I',                                             
   'NO, statement not found in JCL'                                 
   end                                                                
ELSE do                                                               
   Call $CAJCL_ERROR 'I',                                             
   'YES, statement found in JCL'                                     
   end                                                                
Return  

3.  In the RAW_DATA_PROCESSING:  section, read each record, and set flag = Y if the statement exists

RAW_DATA_PROCESSING:                                                  
$CA.RCOUNT = $CA.RCOUNT + 0                  
Do n = 1 to $ca.rcount                                                
  xxx = SUBSTR($CA.RECORD.n,1,5)                                     
  IF xxx = 'abcde' then DO                                           
         flag = Y                                                      
  End                                                                 
  End                                                                 
Return    

   

Additional Information

Sample REXX execs named CAZ1REXX and CAZ1REX2 are provided in the JCLCheck CAZ2CLS0 library.