View previous topic :: View next topic
|
Author |
Message |
useit
Active User
Joined: 05 Oct 2006 Posts: 152
|
|
|
|
hi all,
i have a job JLXXDN0 where N is day number.N=(1-7).
i have 5 steps inside the job. s1,s2,s3,s4,s5,
from day 1-6 i need to execute all the 5 steps.
but in the day 7 (on sunday)i need to bypass first 3 and execute
last 2 steps only.
i think if i can extract the jobnumber or day number then put
this into sequential file .then i can achieve this.
is there any way i can extract day number or job number ?
i searched forum but didnt get much info.saw few rexx code but i never worked on REXX.
plzz help me regardig the same..
Regds,
useit |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Have you tried talking to the team who operate your scheduler? |
|
Back to top |
|
|
useit
Active User
Joined: 05 Oct 2006 Posts: 152
|
|
|
|
yes i spoke to him. he said this can be done through jcl.but he is not sure how:(. i simply dont want to go for another new job. i want to achieve this in the same job. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I was thinking more that the Scheduler knows what day of the week it is, rather than your man would have the particular skills to help out with some fudge...
Presumably something is generating your job names (I wonder what) so knows about Sunday's. So something there... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Or the people in schedular central can't be bothered to do some work |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Or the question was "can I do it in a (piece of) JCL?" rather than "please can you suggest a method whereby it can be done in the scheduler?"
In which case, "yes, I'm sure you can do it somehow in a JCL" can be a good answer whilst preparing the solution anyway. Too much to hope, I suppose :-) |
|
Back to top |
|
|
useit
Active User
Joined: 05 Oct 2006 Posts: 152
|
|
|
|
hi,
can I include one more step in the existing jcl ?if i can extract the job/day number in sequential file later we can check for that file empty/noempty conditions and bypass the required steps.
Regds,
useit |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
By the look of jobnames, terminologies referring to systems in your previous posts, i strongly doubt that your client was my ex-employer & can relate to the scheduler team responses & lengthy approval processes :-)
For the problem at hand, if you want a non-scheduler approach,
You can have a sort step in the JCL that returns a return code based on the current day.
Customise the COND parameter in each step and make them run as needed.
On Sunday the below step will return RC of 0. Other days RC=16
Code: |
//STEP010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
CUR_DAY,S'&WDAY'
/*
//SORTIN DD *
SUNDAY
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY,NULLOUT=RC16
INCLUDE COND=(1,3,CH,EQ,CUR_DAY)
/* |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Or the REXX code is available on the forum if you search |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
Back to top |
|
|
useit
Active User
Joined: 05 Oct 2006 Posts: 152
|
|
|
|
vasanth,
thanx a ton.your code is working fine:) .
thanx again..
Regds,
useit |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
To put another broken record on the turntable...
Now, make sure your JOB always runs before midnight (at least the date-getting step). Make sure it never abends and has to be re-submitted after midnight. Make sure you never need to re-run the job for any reason except on a Sunday (before midnight).
Else, remember you have to change the JOB in those situations, just so it runs correctly. |
|
Back to top |
|
|
|