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
 

 

Run a step of the Job on a particular date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Run a step of the Job on a particular date
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: 456
Location: Belgium

PostPosted: Sat Oct 27, 2007 3:29 pm    Post subject:
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Sat Oct 27, 2007 4:05 pm    Post subject: Reply to: Run a step of the Job on a particular date
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    Post subject:
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

Site Director


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

PostPosted: Sun Oct 28, 2007 3:41 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm


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