ESP Workload Automation

Expand all | Collapse all

EXTERNAL SCOPE (-08) keyword not working as expected

  • 1.  EXTERNAL SCOPE (-08) keyword not working as expected

    Posted 03-22-2016 06:10 PM

    Hello,

    I have an issue with EXTERNAL SCOPE keyword. I have coded an appl which waits on a job in another event using the EXTERNAL SCOPE keyword

    This appl will be triggered multiple times by MQ. Everytime it is triggered, it should check if a particular job has run in the last 8 hours, before releasing the job to run.

    The appl is working fine only the 1st time it is triggered by MQ. When MQ triggers it the 2nd time, it is not running, even though the EXTERNAL condition is satisfied.

     

    Here is the sample script.

    APPL TEST1 WAIT NOPOST_WHILE_WAITING

    .....

    JOB J1

    RUN DAILY

    ENDJOB

    JOB J2 EXTERNAL SCOPE (-08)

    RUN DAILY

    DSTRIG TRG1

    DSNAME HLQ.APPID.TS1 ANYCLOSE

    RUN DAILY

    REL J3

    ENDJOB

    JOB J3

    .....

     

    APPL TEST2 WAIT NOPOST_WHILE_WAITING

    ...

    JOB J1 EXTERNAL SCOPE (-08) APPLID(TEST1) /* This job will run only once in the night in TEST1 Event*/

    RUN DAILY

    REL J2    

    ENDJOB

    JOB J2 /* This job should run multiple times in a night (once for each file) in the MQ queue*/

    RUN DAILY

    ENDJOB

    ..

    I am not sure if there is a problem with the way NOPOST is coded.

    Appreciate if someone could throw light on what I am missing. Thanks.



  • 2.  Re: EXTERNAL SCOPE (-08) keyword not working as expected

    Posted 03-23-2016 07:18 AM

    Musthafa,

     

    I guess I don't understand why in TEST1 , JOB2 has an EXTERNAL statement combined with a DSTRIG statement.  It seems to me that if you were doing a file watcher, it would be separated out into a separate task.  If you want the application to run whenever the GDG comes in, you may consider using a DSTRIG event rather than an external.

     

    Also, if you're unsure of whether your NOPOST is a problem, consider removing it and seeing if the behavior changes.