View previous topic :: View next topic
|
Author |
Message |
manikant pathak
New User
Joined: 09 May 2005 Posts: 37 Location: bangalore
|
|
|
|
Hi all,
I am having a job which is having 3 steps. The first 2 steps will run daily and the last step needs to run only on 15th of every month. Is there any way we can do this using JCL?
It can be done through Scheduler, but is there any way we can do this thru JCL.
Thanks in Advance to all replying this query.
Regards,
MKP |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
I don't think JCL can handle that.
But you can modifiy the program, testing the current date and proceed as wanted.
"Daily run" means every day, or only working days and in that case, you should choice in case of 15 is not a working day between no run, run previous working day, run next working day, ...
Have you access to the code? |
|
Back to top |
|
|
manikant pathak
New User
Joined: 09 May 2005 Posts: 37 Location: bangalore
|
|
|
|
Thanks for your reply,
'Daily' here means everyday irrespective of whether it is a working day or not.
Yes I do have the access to code, but the code will execute only when the step runs. I do not want the step to run at all.
But after looking at you answer i have got an idea.
I will have a program executing as the 3rd step of the Job which will accept the date and if date is 15th i will move a certain Condition code for that step. Then i will put a check for cond code in step 4(existing Step3), and if it matches the CC from previous step it will execute step 4.
Please let me know if anyone is having any other ideas.
Regards,
MKP |
|
Back to top |
|
|
manikant pathak
New User
Joined: 09 May 2005 Posts: 37 Location: bangalore
|
|
|
|
manikant pathak wrote: |
but the code will execute only when the step runs. I do not want the step to run at all.
|
What i mean to say here is that any chnages in the program will execute only when the step starts executing, which is not required. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
What' s wrong doing it thru the scheduler ???
the two step job will have a daily constraint/schedule excluding the 15th
the three step will have the constraint/schedule reversed
Much more manageable by external action, rather then changing the job if
something changes |
|
Back to top |
|
|
manikant pathak
New User
Joined: 09 May 2005 Posts: 37 Location: bangalore
|
|
|
|
There is nothing wrong in doing it using scheduler, but was just curious to know if it can be done thru JCL or not.
Thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you want to do this "outside" the schedule, having code look at the date and make the determination will work nicely. Using code would also give you the ability to provide run-time information that would cause/permit the process to be run other than on the 15th.
If you have control of the code, my preference would be to put the date check in the actual program and simply process or not process depending on the date. I'd prefer not to introduce another step.
Of course, that is only preference - it would work correctly either way. |
|
Back to top |
|
|
|