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

Run a step of the Job on a particular date


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manikant pathak

New User


Joined: 09 May 2005
Posts: 37
Location: bangalore

PostPosted: Sat Oct 27, 2007 3:24 pm
Reply with quote

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

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sat Oct 27, 2007 3:29 pm
Reply with quote

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

New User


Joined: 09 May 2005
Posts: 37
Location: bangalore

PostPosted: Sat Oct 27, 2007 3:38 pm
Reply with quote

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

New User


Joined: 09 May 2005
Posts: 37
Location: bangalore

PostPosted: Sat Oct 27, 2007 3:42 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Oct 27, 2007 4:05 pm
Reply with quote

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

New User


Joined: 09 May 2005
Posts: 37
Location: bangalore

PostPosted: Sat Oct 27, 2007 4:15 pm
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Oct 28, 2007 3:41 am
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top