When using EXTERNALs or MANUALs to build inter-application dependencies, the SCOPE or SCHEDULED statements can be used to identify exactly which run of the job in the other application to connect with.
How to prevent the scheduler from posting the EXTERNAL/MANUAL job as soon as the APPL is created?
CA Workload Automation ESP Edition release 11.4
Use the SCHEDULED statement instead of SCOPE. The SCHEDULED statement prevents the EXTERNAL from being satisfied when an event is triggered early. When an APPL that uses scope is triggered early, the external may satisfy since the external job completed within the SCOPE time.
For the example below, no matter when this application is created, ESP will only look for the application that is scheduled to build at 6AM today. The scheduled time is found in the event.
JOB myjob EXTERNAL APPLID(myappl) SCHEDULED('06:00 today')
For the example below, no matter when this application is created, ESP will only look for the application that is scheduled between 6AM today to 6 AM tomorrow:
JOB myjob EXTERNAL APPLID(myappl) SCHEDULED('06:00 today until 06:00 tomorrow')
The SCHEDULED statement will also work correctly when schedules are running behind. The SCOPE statement may not look back far enough. This will cause some schedules to hang. It is best to use SCHEDULED in every case.
Additional information can be found in the CA Workload Automation ESP Edition Command Reference Guide under the "JOB" statement. For examples on using EXTERNALs and MANUALs see the CA Workload Automation ESP Edition see the section labeled "Defining External Jobs".