MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Run job for date range without manually changing the date

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
pvrajs
Beginner


Joined: 07 Jan 2005
Posts: 41
Topics: 12

PostPosted: Thu Jul 14, 2005 12:12 am    Post subject: Run job for date range without manually changing the date Reply with quote

Hi,

Described below is the issue I am facing ...

I have a batch job. Some of the steps in the job accept the datecard as parameter. The datecard is read from the file. The date in the file is of the following format .. (>071305071405071505) prevdaytodaynextday.

When I have to run this job for previous date, I do a manual update of the datecard and submit the job. This seems fine when I need to run the job for a week or so (manually changing the date for every submit). This is a tedious when I need to submit it for date range greater than a week.

My Solution

1. Add a step at the end of the job to flip the date to the next business date.
2. Write new job to call the old updated job for 'n' number of times as below -

//M132BMND JOB (1),'NEWDATE',CLASS=T,MSGCLASS=T,REGION=6500K
//STEP0010 EXEC PGM=IKJEFT01
//SYSUDUMP DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSTSIN DD *
SUB 'jobname'
SUB 'jobname'
/*

Please let me know if we have a better way of tackling this problem. I heard that there is some concept called Stacks .. in Mainframe, for implementing the same. But I don't know how to use it.

Thanks in advance for the help.
Vijay
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Sat Nov 12, 2005 4:03 am    Post subject: Reply with quote

I didn't get you, what is the problem with the solution you found?
Back to top
View user's profile Send private message Send e-mail
Nabanita Das
Beginner


Joined: 09 Nov 2005
Posts: 33
Topics: 10

PostPosted: Wed Nov 23, 2005 4:52 am    Post subject: Reply with quote

PVRAJS,
I am also looking for a solution for similar problem. Can you please explain elaborately what you are doing and what problem you are facing when you tried the JCL that submits the new job

Nabanita
Back to top
View user's profile Send private message
Nabanita Das
Beginner


Joined: 09 Nov 2005
Posts: 33
Topics: 10

PostPosted: Fri Nov 25, 2005 7:30 am    Post subject: Reply with quote

Can someone help us doing this as I need to do this for a big datacorrection ticket where I need to run my job for dates starting from APR thru Nov.

Help please.
Thanks and Regards,
Nabanita
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Nov 26, 2005 8:36 am    Post subject: Reply with quote

Nabanita Das,

Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nabanita Das
Beginner


Joined: 09 Nov 2005
Posts: 33
Topics: 10

PostPosted: Mon Nov 28, 2005 4:51 am    Post subject: Reply with quote

Kolusu,

I have a data correction ticket. For this ticket I have created a program meeting my functional requirements. Now I have got files for every Satureday starting from APR to Nov which needs to be processed through the same program.

SO this is what I am planning:

1. Create a JCL which executes my program
2. By some means( this is where I need help) the date needs to be changed after the first job runs successfully and the next job should be run if the RC from the prev job is <=4.

This way for every satureday I need to execute the same program.

I was thinking of REXX panel or the approach pvraja has taken. Using REXX we can have a panel which will keep on asking me to change date as soon as the prev job completes successfully.

Please let me know if I need to explain more.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Nov 28, 2005 5:39 am    Post subject: Reply with quote

Quote:

This way for every satureday I need to execute the same program


why not the program check for the date and check if it is a saturday? Check this link for examples.

http://mvsforums.com/helpboards/viewtopic.php?p=24856#24856

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nabanita Das
Beginner


Joined: 09 Nov 2005
Posts: 33
Topics: 10

PostPosted: Wed Nov 30, 2005 4:48 am    Post subject: Reply with quote

Kolusu,
I visited the link suggested by you.I think this does not meet my requirement.

Nabanita
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group