How to make changes to an entire JCL library using the JCLNeat feature of JCLCheck
search cancel

How to make changes to an entire JCL library using the JCLNeat feature of JCLCheck

book

Article ID: 22912

calendar_today

Updated On:

Products

JCLCheck Workload Automation

Issue/Introduction

This Knowledge Document provides examples on how to make changes to an entire JCL library using the JCLNeat  'Global String Replacement' (GSR) feature.


 

 

Environment

Release: 12.0
Component: JCLCheck Workload Automation

Resolution

1. Change all UNIT=TAPE to UNIT=CART.  The new JCL members will be written to data set name JCL.LIB.NEW

//JSTEP1 EXEC CAZ1NEAT
//PDSIN   DD DISP=SHR,DSN=JCL.LIB
//PDSOUT  DD DISP=OLD,DSN=JCL.LIB.NEW
//JCLNOPTS   DD *
FORMAT=Y
INLIB=PDS
OUTLIB=PDS
//GSRCNTL DD *
|TAPE|REPL|
|CART|

2. Change all data set name PAYROLL.TEST.INPUT to PAYROLL.PROD.INPUT.

//JSTEP1 EXEC CAZ1NEAT
//PDSIN   DD DISP=SHR,DSN=JCL.LIB
//PDSOUT  DD DISP=OLD,DSN=JCL.LIB.NEW
//JCLNOPTS   DD *
FORMAT=Y
INLIB=PDS
OUTLIB=PDS
//GSRCNTL DD *
|PAYROLL.TEST.INPUT|REPL|
|PAYROLL.PROD.INPUT|


Multiple GSRCNTL statements may be combined. GSR feature may be combined with other JCLNEAT feature such as KEYWORD reordering and other reformatting functions. 

As best practice after performing JCLNEAT functions, use JCLCheck to verify that the changes did not cause errors.