View previous topic :: View next topic
|
Author |
Message |
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
If there are 5 steps in a jcl, step 3 has to be run only if the JCL run date falls on the last week Friday of everymonth else the JCL should run step1,2,4 and 5 excluding step 3 on the first 3 week friday's of everymonth. Can this be done using OPC scheduler.
I know,in ca7, it can be done through job omit card and job include card before the start of the step3. But I am not sure about how to accomplish this thru OPC. Can anyone give me some details about it. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
For OPC you have to make two jobs, 1 for steps 1,2,4,5 and 1 for step 3.
In OPC you define 2 applications for the 2 jobs. Define run cycles and/or
periods for those 2 applications.
For details ask your TWS support or consult the manual :
Planning and Scheduling the Workload SH19-4546-01 |
|
Back to top |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
Thanks, Peter. I didn't know this is the only way to accomplish such scenarios in OPC. |
|
Back to top |
|
|
Tim Rock
New User
Joined: 20 Aug 2007 Posts: 2 Location: Phoenix, AZ
|
|
|
|
TWS supplied variable "CDD" resolves to occurrence calendar day -- this code inserts STEP3 if cal. day is 25 thru 31:
//STEP1 EXEC PGM=IEFBR14
//STEP2 EXEC PGM=IEFBR14
//*
//*%OPC BEGIN ACTION=INCLUDE
//TESTDATE IF (&CDD > 24) THEN
//STEP3 EXEC PGM=IEFBR14
//TESTDAT1 ENDIF
//*%OPC END ACTION=INCLUDE
//*
//STEP4 EXEC PGM=IEFBR14
//STEP5 EXEC PGM=IEFBR14 |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Tim,
how does day 25 thru 31 satisfy months with less than 31 days ?
Although I'm confused with the request
Quote: |
Executes a step only on last week of the month in the jcl |
and then
Quote: |
run date falls on the last week Friday of everymonth |
Gerry |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Tim,
as far as i understood the TS :
step 3 has to be run only if the JCL run date falls on the last week Friday of every month
else step 1,2,4 and 5 excluding step 3 on the first 3 week friday's of every month
So for me that means that step 3 is not to be inserted. |
|
Back to top |
|
|
Tim Rock
New User
Joined: 20 Aug 2007 Posts: 2 Location: Phoenix, AZ
|
|
|
|
my solution was a way to insert a jobstep only on a range of calendar dates.
There are other supplied variables that check which weekday it is.
It seems like with a combination of IF statements checking day and date you can tweak this to do whatever you need. |
|
Back to top |
|
|
|