How to automatically delete a member from ESP TEMPLIB after the job's submitted.
Component: ESP Workload Automation
Release: 12.0
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. It will override the JCL that is stored on the data set specified on the JCLLIB statement.
CYBJSDLT module deletes the TEMPLIB member after the JCL is written to the COPYJCL data set except in the following cases:
- There is no COPYJCL data set specified. In this case, CYBJSDLT is not invoked.
- USERMOD 198 is turned on, the job was submitted from the TEMPLIB library and the job in TEMPLIB was selected based on the value of the //* FROM statement, the //* UNTIL statement, or both.
Enable the JCLSCAN exit module named CYBJSDLT by adding the line below to the 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.