View previous topic :: View next topic
|
Author |
Message |
HammerTime
New User
Joined: 26 Sep 2012 Posts: 14 Location: UK
|
|
|
|
Hi folks, got a fairly simple request, but so far i've drawn a blank with a workable solution.
Is it possible for OPC to use a relative time dependency, eg: Job B can only start X minutes after Job A completes?
The issue we are facing is that we have an application created with all of the necessary job dependencies, and also some time dependencies.
We currently have Job A scheduled to run at 00:00.
Job B has a job dependency on Job A, but also has a time dependency of 01:00 to allow some external processing (on another system not scheduled by OPC) to complete before Job B runs. In reality, this gap probably only needs to be 10 mins max, we just schedule an hour for contingency.
This all works perfectly, unless for some reason Job A is delayed (eg: IPL takes place/earlier job failures/etc.) and does not start until >= 01:00, as Job B then triggers immediately following Job A (because it's Time Dependency has been satisfied). This results in a problem for us.
Unfortunately it's not as simple as just allowing a later start time for Job B, as it is critical to have this running as early as possible in an already tight batch window.
I've looked into creating some REXX which performs a Pause, but don't really like that approach.
Surely there must be something possible in OPC which could achieve what I need? |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
It depends what release your are on. If I recall correctly, that facility came in with v8.3. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Also you can delay in JCL itself or write a simple COBOL program which does so.
Code: |
CBL DATA(24)
IDENTIFICATION DIVISION.
PROGRAM-ID. DELAY
DATE-COMPILED.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WAIT-MODULE PIC X(08) VALUE 'ILBOWAT0'.
01 WAIT-TIME PIC S9(8) COMP VALUE 0.
PROCEDURE DIVISION.
MOVE +45 TO WAIT-TIME.
CALL WAIT-MODULE USING WAIT-TIME.
GOBACK. |
|
|
Back to top |
|
|
HammerTime
New User
Joined: 26 Sep 2012 Posts: 14 Location: UK
|
|
|
|
Thanks for the replies. Looks like we are on v8R5 OPC on Z/OS, so there may be a glimmer of hope!
We don't have ILBOWATO on our installation, and I've yet to find a way of performing the delay in JCL. I can do it in REXX without too much trouble, but would prefer to control this delay with OPC if possible.
@David - Don't suppose you have any info on how this can be done on Z/OS OPC? I've drawn a blank after a lot of reading through the manuals. |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
You need to set up a new work-station specifically for this purpose. Work-station type is general, reporting attribute is non-reporting, and set the WAIT option to Y.
Then you simply "run" the job on that work-station, setting the duration to the time delay that you want. Dependencies are added as with any other job, i.e.; your second job will be dependent on your "wait" job which will be dependent on your first job.
As a slight aside, if you have TWS anyway you can also use the supplied program EQQRETWM to introduce a delay in to your batch job, e.g.;
EXEC PGM=EQQRETWM,PARM=WT300
will cause your batch job to wait for 5 minutes. Much better to do it with a wait work-station though, especially for long delays. |
|
Back to top |
|
|
HammerTime
New User
Joined: 26 Sep 2012 Posts: 14 Location: UK
|
|
|
|
Fantastic, thanks David. Will give that a go. |
|
Back to top |
|
|
|