Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Trigger jobs but have to run within a specified time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
peterwu

New User


Joined: 21 Jun 2009
Posts: 3
Location: Toronto

PostPosted: Sun Jun 21, 2009 9:28 am    Post subject: Trigger jobs but have to run within a specified time
Reply with quote

Hi,

I have the following jobs flow and scheduled in CA7:
X -> A -> B -> C -> D ... up to J.

But jobs A, B, C ..... J should only run within a specified time in any day, say between 17:00 - 20:00 hours.

For example if the job is triggered before 17:00 then it should wait until 17:00 to run or if the job is triggered after 20:00 then it should wait until tomorrow 17:00 to run.

Please advise how to achieve this in CA7. Thanks.
Back to top
View user's profile Send private message

maheshvamsi

New User


Joined: 22 Mar 2008
Posts: 39
Location: bangalore

PostPosted: Mon Jun 22, 2009 7:39 am    Post subject:
Reply with quote

1. How the job X will be triggered?

2. What happens if the job X triggers between 17.00 to 20.00??

If you want the jobs A,B,C need to be triggered at only 17.00 after the jobs X triggers, you can use SASTRLR. By using SASTRLR step in Job X, you can demand it at 17.00 PM, using below command.

DEMAND,JOB=JOBNAME, TIME=1700.

This will demand Job A to run at 17.00. As you are already having triggers it will run rest of the stream.

If Job X, triggers before 1700, Job A will start running at 17.00

If Job X, triggers after 1700, Job A will start running on Nextday 17.00.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Jun 22, 2009 8:53 am    Post subject:
Reply with quote

Hi maheshvamsi,

DEMAND will server purpose to run suite once.. It wont automate process..
Back to top
View user's profile Send private message
maheshvamsi

New User


Joined: 22 Mar 2008
Posts: 39
Location: bangalore

PostPosted: Mon Jun 22, 2009 12:12 pm    Post subject:
Reply with quote

As per my understading, Job X will run at any time, But A job should run 5 PM, after X runs.

At that time you should use demand with time option.

If you simply use Demand, Job A will run as soon as X completes.
Back to top
View user's profile Send private message
peterwu

New User


Joined: 21 Jun 2009
Posts: 3
Location: Toronto

PostPosted: Mon Jun 22, 2009 6:02 pm    Post subject:
Reply with quote

Yes, job X will run at any time. Demanding and using the time option is good but not perfect in my case.

If X completed at 18:00, Job A needs to wait for the next day 17:00 to run but actually it is allow to run at between 17:00 and 20:00. Therefore the drawback is once X completed after 17:00 all the rest of jobs need to wait for the next day even X completed before 20:00.

I have to write a small program to check the time Job X completed and base on the completion time to flag a condition code on the step, then using SASSTRLR to either demand with time option or without time option depending on the return code of the program.

One thing I am not sure is the TIME=1700 option will automatic wait for the next day 17:00 to run if it is demand after 17:00 but before 23:59, or we need to use the DATE=+01 to specify the next day. Any confirmation about time option for the "NEXTDAY" issue?
Back to top
View user's profile Send private message
maheshvamsi

New User


Joined: 22 Mar 2008
Posts: 39
Location: bangalore

PostPosted: Mon Jun 22, 2009 6:43 pm    Post subject:
Reply with quote

Quote:
I have to write a small program to check the time Job X completed and base on the completion time to flag a condition code on the step, then using SASSTRLR to either demand with time option or without time option depending on the return code of the program.


I think no need to write a program for checking a flag or time.

Just you can use demand with Time option.

If job X completes before 1700, Job A will starting running at 1700 on same day.

Else If Job X completes after 1700. JobA will start running at 1700 nextday.
Back to top
View user's profile Send private message
peterwu

New User


Joined: 21 Jun 2009
Posts: 3
Location: Toronto

PostPosted: Mon Jun 22, 2009 6:54 pm    Post subject:
Reply with quote

Understandable, but it will waste for some valuable time (max 3 hours) if job A is triggered at 1701 and waiting for 24 hours before it runs while it could be finished already.

Any idea on the time option query that it will span the next day to execute?

Thanks
Back to top
View user's profile Send private message
maheshvamsi

New User


Joined: 22 Mar 2008
Posts: 39
Location: bangalore

PostPosted: Mon Jun 22, 2009 6:59 pm    Post subject:
Reply with quote

I have no idea... icon_sad.gif

If you demand a job with date(like next days date) also, it will be sitting in CA7 till that time comes.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 5 Sat May 06, 2017 12:59 am
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts Application not run by time HH:MM tri... jzhardy IBM Tools 1 Sun Apr 09, 2017 3:22 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us