Is there a benefit to using SCHEDULED over SCOPE when defining External jobs?
search cancel

Is there a benefit to using SCHEDULED over SCOPE when defining External jobs?

book

Article ID: 55496

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

 

Using SCOPE and SCHEDULED statements on External jobs.

Environment

Release: All Releases of ESP

Resolution

SCHEDULED or SCOPE can be used when coding an External in the Distant application. One useful benefit of using SCHEDULED is the fact that the LAP command shows the time period the External is looking for the job to be scheduled in the Home Application. For example:

The Event:
/*************************************************/
/* DEFINED BY CYBER  AT 13.09 ON TUE 15JUL2003 */
/*************************************************/
EVENT ID(CYBER.DISTANT)  SYSTEM(ESP)  REPLACE
SCHEDULE 13.11 DAILY STARTING TUE 15TH JUL 2003
INVOKE 'CYBER.TEST.PROCLIB(DISTANT)'
ENDDEF
The Procedure:
APPL DISTANT 
JCLLIB 'CYBER.TEST.JCLLIB'
JOB TEST1 EXTERNAL-
          SCHEDULED('NOW LESS 59 MINUTES ENDING NOW PLUS 1 HOURS')
 RUN DAILY
 RELEASE TEST2
ENDJOB
JOB TEST2 EXTERNAL SCHEDULED ('YESTERDAY') APPLID(HOME)
 RUN DAILY
 RELEASE TEST3
ENDJOB
JOB TEST3 EXTERNAL SCOPE(-01:00)
 RUN DAILY
 RELEASE UNIX
ENDJOB

Event triggers at 13:11 as specified.  Results of LA command in CSF:
LAP DISTANT.13 ALL
APPL DISTANT  GEN 13
  CREATED AT 13.11 ON TUESDAY JULY 15TH, 2003
           BY EVENT CYBER.DISTANT
  TEST1, HC=0
   Scheduled between 12.12 on TUE 15 JUL 2003 and 14.11 on TUE 15 JUL 2003
   EXTERNAL
   ANTICIPATED END TIME: 13.11 ON TUESDAY JULY 15TH, 2003
   PREDECESSORS: (NONE)
     SUCCESSORS: TEST2
TEST2, HC=1 Scheduled between 00.00 on MON 14 JUL 2003 and 23.59 on MON 14 JUL 2003 EXTERNAL ANTICIPATED END TIME: 13.12 ON TUESDAY JULY 15TH, 2003 PREDECESSORS: TEST1 SUCCESSORS: TEST3
TEST3, HC=1 EXTERNAL ANTICIPATED END TIME: 13.14 ON TUESDAY JULY 15TH, 2003 PREDECESSORS: TEST2 SUCCESSORS: (NONE)
----- 1 ENTRY DISPLAYED
Note that the Jobs using SCHEDULED display when it is expecting to have the job in the HOME application scheduled. The job coded with SCOPE does not.