search cancel

JCLNeat REXX interface: How to update a previous JCL statement

book

Article ID: 227685

calendar_today

Updated On:

Products

JCLCheck Workload Automation

Issue/Introduction

Sample input JCL to the JCLNeat REXX interface:

    //STEP1 EXEC PGM=IKJEFT01                                          
    //SYSTSPRT DD  SYSOUT=*                                               
    //SYSPRINT DD  SYSOUT=*                                               
    //SYSIN    DD  DUMMY                                                  
    //SYSTSIN  DD  *                                                      
    PROFILE NOPREFIX                                                      
    EXEC 'MY.LIB.REXX(EXEC1)'

Desired output: check SYSTSIN control statements.  If found EXEC 'MY.LIB.REXX(EXEC1)' , add COND=ONLY to the EXEC statement.

Output JCL needs to look like this: 

    //STEP1 EXEC PGM=IKJEFT01,COND=ONLY                                          
    //SYSTSPRT DD  SYSOUT=*                                               
    //SYSPRINT DD  SYSOUT=*                                               
    //SYSIN    DD  DUMMY                                                  
    //SYSTSIN  DD  *                                                      
    PROFILE NOPREFIX                                                      
    EXEC 'MY.LIB.REXX(EXEC1)'

 

Environment

Release : 12.0

Component : JCLCheck Workload Automation

Resolution

The EXEC PGM statement has already been processed, and can no longer be updated once the SYSTSIN statements are reached. 

The solution is to use the new REXX variable $CA.RSTYPE = CLOS which was introduced by PTF SO10027.  

$CA.RSTYPE = CLOS indicates that the output PDS member has been created.  To update it, open the file, read the records, and make the necessary final changes.