View previous topic :: View next topic
|
Author |
Message |
Thameem
New User
Joined: 21 Feb 2007 Posts: 4 Location: Chennai
|
|
|
|
Hi,
I have a requirement in the jcl as such. The jcl has steps1..... to step 10
Currently all the steps are running weekly. My requirement is such that
Steps 7...to Steps 10 needs to execute only in the fourth week and steps
1 to 6 needs to run weekly. Kindly give your suggestions.
Thanks . |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Thameem,
Why dont you create two jobs and schedule them accordingly? This is lots easier the one which you had asked for (Im not sure it could be done). |
|
Back to top |
|
|
Thameem
New User
Joined: 21 Feb 2007 Posts: 4 Location: Chennai
|
|
|
|
Yes, it could be done. But is there any possibility of doing it through condition code/return code....? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Hi!
it could be done... but,
STRONG ADVICE
there are legal/business standards on the week numbering so,
as far as the week of the year/month calculation it is better
to let the scheduler with its solar/legal/business calendar facilities to take care of it.
for this kind of requirements relying on RYO ( roll your own / do it yourself )
code is DANGEROUS unless You have a clear view of the standards
regards
e.s
P.S.
RYO ( roll Your own ) it' s an old way of showing trust,
when cigarettes were not ready made and You had to roll then from cigarette paper and tobacco,
instead of offering like nowadays a cigarette You would have offered the
oher guy your tobacco pouch, saying something like
>>... roll your own .... |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Use a program to set the RETURN-CODE to a non-zero value value if the week is the fourth week of the month. If not, then set it to zero
//STEP00 EXEC PGM=PGMXXX PGM TO SET RETURN-CODE
//*
// IF (STEP00.RC = 0) THEN
//STEP01 EXEC PGM1
//STEP02 EXEC PGM2
//STEP03 EXEC PGM3
//STEP04 EXEC PGM4
//STEP05 EXEC PGM5
//STEP06 EXEC PGM6
// ELSE
//STEP07 EXEC PGM=PGM7
//STEP08 EXEC PGM=PGM8
//STEP09 EXEC PGM=PGM9
//STEP10 EXEC PGM=PGM10
// ENDIF |
|
Back to top |
|
|
SHAILESH OZA
New User
Joined: 10 Jun 2005 Posts: 21 Location: Mumbai
|
|
|
|
if you are using any scheduler for executing the jobs. then i think all the options are available in the scheduler to execute the job on weekly. monthly,daily. also you can specify the time when should the job will execute. We are using the Control-M schduler in which all the options are available |
|
Back to top |
|
|
timburkart
New User
Joined: 17 Mar 2007 Posts: 29 Location: USA
|
|
|
|
I am definitely in favor of SHAILESH OZA to use a job scheduler. Sure a programmatic solution will work but all of the schedulers that I have been exposed to include this as routine functionality.
regards,
tim |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
I think your task is simple to implement but you need to co ordinate with the scheduler to have this job to be submitted in the following way.
Quote: |
//Myjob JOB......
//STEP01 EXEC PGM1
//STEP02 EXEC PGM2
//STEP03 EXEC PGM3
//STEP04 EXEC PGM4
//STEP05 EXEC PGM5
//STEP06 EXEC PGM6
#JI,ID=31(say for the fourth week running steps)
//STEP07 EXEC PGM=PGM7
//STEP08 EXEC PGM=PGM8
//STEP09 EXEC PGM=PGM9
//STEP10 EXEC PGM=PGM10
#JEND |
Here all you need to do is instruct the scheduler in such a way that the JOB should be running ever week with its regular SCHID except the fourth week. In fourth week it MUST run with SCHID=31 to include the steps 7,8,9,10.
I tink you understoos. I feel your issues is resolved.
Please check and let me know if you have any problems.
Regards
Amar |
|
Back to top |
|
|
Thameem
New User
Joined: 21 Feb 2007 Posts: 4 Location: Chennai
|
|
|
|
Thanks everyone for all your suggestions. The issue was solved by splitting the job into two. One is scheduled as weekly and the other job is scheduled as monthly...... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Thank you for posting your resolution |
|
Back to top |
|
|
|