View previous topic :: View next topic
|
Author |
Message |
bidhucsc
New User
Joined: 24 Dec 2007 Posts: 10 Location: India
|
|
|
|
Hi,
I have a tricky situation. Here is my JCL.
Code: |
//UID9999A JOB (ACCOUNTINFO),'C02030IN',
// CLASS=A,
// REGION=0M,
// MSGCLASS=T,
// TIME=
/*JOBPARM R=HS1C,S=F081
//*
//JS001 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=$
//SYSOUT DD SYSOUT=$
//SYSIN DD DUMMY
//SYSUT1 DD DSN=AAA.BBB.CCCCCCCC.JCLLIB(C02030BP),DISP=SHR
//SYSUT2 DD SYSOUT=(E,INTRDR)
//*
//JS002 EXEC PGM=IEBGENER,COND=(0,LT)
//SYSPRINT DD SYSOUT=$
//SYSOUT DD SYSOUT=$
//SYSIN DD DUMMY
//SYSUT1 DD DSN=AAA.BBB.CCCCCCCC.UTILLIB(C02030RC),DISP=SHR
//SYSUT2 DD SYSOUT=(E,INTRDR)
//*
//JS204IN EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=$
//SYSOUT DD SYSOUT=$
//SYSIN DD DUMMY
//SYSUT1 DD DSN=AAA.BBB.CCCCCCCC.UTILLIB(C02040IN),
// DISP=SHR
//SYSUT2 DD SYSOUT=(E,INTRDR) |
Evey step in the JCL is submitting a JCL. The last step JS204IN is submitting a JCL which starts a chain reaction to submit another set of JCLs.
My question is can I start JS204IN step by checking condition code from job C02030RC submitted in previous step JS002 ? The JOB names of all JCLs are same. So they are running in sequence.
I cant combine all JCLs as I have 100s JCLs like this and they need to run in sequence as they are updating the database.
How do I solve this, any idea ? Pls help.
Thanks
Bidhu |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
I would guess not because step JS204IN will begin executing after job C02030RC has been submitted but probably before it has completed. In other words, job C02030RC will probably still be running when step JS204IN is ready to do its test, and I don't think there's a way for a step to test the RC of another job anyway. Besides, this type of conditional executing should normally be handled by your scheduling software. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
if all the jobnames are the same, then the jobs are not goning to run in parallel, then why not add a step to each job to submit the next job.
ie. on completion of member C02030BP submit C02030RC, on completion of C02030RC submit C02040IN, on completion C02040IN submit C02030BP.
How do you stop the loop ?
Gerry |
|
Back to top |
|
|
bidhucsc
New User
Joined: 24 Dec 2007 Posts: 10 Location: India
|
|
|
|
Thanks for your replies.
Terry, BP will complete 1st before RC as they have the same names and they are running in sequence.
Gerry,
There is no loop. This JCL (C02030IN) has the sequence of JCLs to run. If you see the last step has C02040IN and in C02030IN we have C02050IN and so on. But these IN JCL may have different steps in them. These IN JCLs are already present in the system and I am trying to combine them based on some request.
Since I am combining these JCLs (putting next JCLs at the end step) using REXX, it will be difficult for me to determine which is running after what. Since there are 100s of JCLs, the REXX will take forever to run.
Is there a way to run the JS204IN step, based on the return code from C02030RC JCL ? I could not find it in IBM manuals.
Any help in this regard will be appreciated.
Thanks
Bidhu |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Not easily. They are two seperate addresss spaces and as such can not communicate to each other.
Of course, this is a perfect example of what a scheduler package should be used for. |
|
Back to top |
|
|
bidhucsc
New User
Joined: 24 Dec 2007 Posts: 10 Location: India
|
|
|
|
Using a scheduler is a good option but these jobs are one time set up jobs that we give to our customers when we give the packages.
Slightly close to what Gerry suggested, I am thinking of putting C02040IN at the end of C02030RC. This should work, I hope.
Thanks all for your responses. |
|
Back to top |
|
|
|