IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is it possible to have a relative time dependency on OPC?


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
HammerTime

New User


Joined: 26 Sep 2012
Posts: 14
Location: UK

PostPosted: Fri Jan 16, 2015 9:20 pm
Reply with quote

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
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Fri Jan 16, 2015 10:10 pm
Reply with quote

It depends what release your are on. If I recall correctly, that facility came in with v8.3.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Sat Jan 17, 2015 12:52 am
Reply with quote

publib.boulder.ibm.com/tividd/td/opc/GC32-0402-00/en_US/PDF/GC32-0402-00.pdf

Please have a look at 10.4 or page no-135, I think that should answer what have you asked.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Sat Jan 17, 2015 1:35 am
Reply with quote

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
View user's profile Send private message
HammerTime

New User


Joined: 26 Sep 2012
Posts: 14
Location: UK

PostPosted: Mon Jan 19, 2015 4:56 pm
Reply with quote

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
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Mon Jan 19, 2015 6:46 pm
Reply with quote

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
View user's profile Send private message
HammerTime

New User


Joined: 26 Sep 2012
Posts: 14
Location: UK

PostPosted: Mon Jan 19, 2015 6:52 pm
Reply with quote

Fantastic, thanks David. Will give that a go.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top