JCLNEAT - How to add JCL statements using Global String Replacement (GSRCNTL)
search cancel

JCLNEAT - How to add JCL statements using Global String Replacement (GSRCNTL)

book

Article ID: 280902

calendar_today

Updated On:

Products

JCLCheck Workload Automation

Issue/Introduction

If a JCL member has the following INCLUDE statements, bypass the GSRCNTL, otherwise add them after the PROCLIB statement.

//PROCLIB  JCLLIB ORDER=CAI.SYSA.PROCLIB  
//*                                           
// INCLUDE MEMBER=SETENV                      
// INCLUDE MEMBER=SETJLIB                     
//*                   

Environment

JCLCheck Workload Automation

All releases

Resolution

Syntax of the GSRCNTL statements starting in column 1:

|from-string|verb|JCL-type
|to-string|

In this case, code the following GSRCNTL control statements: 

//GSRCNTL DD *                
|JCLLIB|INSA|JCLLIB           
|// INCLUDE MEMBER=SETENV|    
|JCLLIB|INSA|JCLLIB           
|// INCLUDE MEMBER=SETJLIB|   
|MEMBER=|DELT|INCLUDE      

Explanation:

. Insert the INCLUDE statement after the statement that contains the word 'JCLLIB'.  Limit the operation to JCL type 'JCLLIB'. 

. Delete statements containing the string 'MEMBER='.  Limit the operation to JCL type INCLUDE. 

If the from-string is not found, the control statement is ignored.

 

Additional Information