Using JCLNEAT Global String Replacement (GSR) - Deleting and Adding JCL statements

Document ID : KB000031139
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary: 

CA JCLCheck Workload Automation includes the JCLNeat feature that allows a standardized format of JCL in your environment.  JCLNeat includes the Global String Replacement (GSR) feature that enables you to replace any character string in the JCL.  It also provides different verbs to delete, replace, comment and insert JCL statements.

 

Instructions: 

Here is a sample of the use of GSR to to replace an existing data set and add a concatenation to the existing JOBLIB dd statement. 

Current JCL

//MYJOBNAM JOB 12345,H,MSGCLASS=X,CLASS=K

//JOBLIB DD   DISP=SHR,DSN=MYLIB1

//S1     EXEC PGM=MYPGM

 

In the CAZ1NEAT step, add a GSRCNTL DD statement with the following syntax:

//GSRCNTL  DD *

|JOBLIB|DELT|DD

|JOB|INSA|JOB

|//JOBLIB DD DISP=SHR,DSN=MY.NEWLIB

|JOB|INSA|

|// DD DISP=SHR,DSN=MY.NEWLIB2|

/*

 

After the CAZ1NEAT JCLNeat step is run, the formatted JCL will be:

//MYJOBNAM JOB 12345,H,MSGCLASS=X,CLASS=K

//JOBLIB DD   DISP=SHR,DSN=MYLIB1

//       DD   DISP=SHR,DSN=MYLIB2

//S1     EXEC PGM=MYPGM

 

Additional Information:  

Additional examples are shown in the CA JCLCheck Command Reference Guide, Chapter 5, Using JCLNeat, Global String Replacement.