How to delete the JCL member from a CA WA ESP TEMPLIB after JOB submission?

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

 

Introduction: 

 How to automatically delete a member from the CA WA ESP TEMPLIB after the job is submitted.

 Background:  

 When the TEMPLIB 'HLQ.DSN' statement is specified in the APPLication, jobs will pull the JCL from the TEMPLIB data set if a member exists there.  It will override the JCL that is stored on the data set specified on the JCLLIB statement.   Using the TEMPLIB delete exit below, CA WA ESP automatically deletes the JCL in TEMPLIB after the job is started.    

 Environment:  

 CA Workload Automation ESP Edition release 11.4

 Instructions: 

 Enable JCLSCAN exit module named CYBJSDLT by adding the line below to the CA WA ESP initialization parmlib:

    EXIT FUNCTION(JCLSCAN) MODULE(CYBJSDLT)

 NOTES:

1) Every time a JOB is submitted, this user exit will be invoked which will delete the member from TEMPLIB.

2) It is best to use a COPYJCL statement so the JCL is copied to the COPYJCL library. If the job fails, the JCL in TEMPLIB is no longer available. The one in COPYJCL can be used for the restart.  

Additional Information:

 CA Workload Automation ESP Edition Programming Guide.  Search for the keyword CYBJSDLT.

 CA Workload Automation ESP Edition Command Reference Guide. Search for the keyword CYBJSDLT.

 Knowledge Document  TEC487636 "TEMPLIB member not deleted when JCLSCAN exit coded".