How to automatically delete a member from the CA WA ESP TEMPLIB after the job is submitted.
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.
CA Workload Automation ESP Edition release 11.4
Enable JCLSCAN exit module named CYBJSDLT by adding the line below to the CA WA ESP initialization parmlib:
EXIT FUNCTION(JCLSCAN) MODULE(CYBJSDLT)
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.
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".