View previous topic :: View next topic
|
Author |
Message |
Amit Manas Dubey Currently Banned New User
Joined: 15 Dec 2006 Posts: 22 Location: Mumbai
|
|
|
|
I have a job which has three Steps. I want to execute Step 2 only.
Thanks
Amit. |
|
Back to top |
|
|
rajandhla
Active User
Joined: 18 Oct 2005 Posts: 182 Location: Luton UK
|
|
|
|
Use restart parameter to run from step 2 and comment step 3
or comment step 1 and step 3 and run job..
hope it is one time request
Regards,
JR |
|
Back to top |
|
|
Amit Manas Dubey Currently Banned New User
Joined: 15 Dec 2006 Posts: 22 Location: Mumbai
|
|
|
|
Hi
Actually, I am interested in knowing if this can be done without commenting the Step1 and Step3.
One way is to use RESTART parm from Step 2 and then use COND(0,LE) which will skip the Step 3 also, if Step 2 executes with a RC=0.
But what I want is that whatever happens to Step 2, Step 1 and Step 3 are not executed.
Hope I am clear on this.
Thanks
Amit. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1049 Location: Richmond, Virginia
|
|
|
|
I use COND=(1111,NE) to bypass steps (if RC not= 1111, which should be all prev steps).
Since 1111 is not a standard RC, it stands out visually as a special check. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Amit,
Code "RESTART=STEP2,COND=(0,LE)" in the JOB card along w/any other params you need. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Amit,
You can use IEBEDIT for this
Code: |
// JOB . . .
//STEP1 EXEC PGM=IEBEDIT
//SYSUT1 DD DSN=dataset that contain jcl,DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=STEP2
/* |
|
|
Back to top |
|
|
pankaj_kulkarni111
New User
Joined: 17 Aug 2006 Posts: 13 Location: Pune
|
|
|
|
Amit,
There are FOUR methods to do this.
1. Use IEBEDIT which is well expalined by few people here.
2. Just comment out all the remaining steps in the pgm.
3. Just mark NULL statement (//) after the step 2 which will end the program.
4. See below pgm
//T91IPPUB JOB ('pppp17',22),'pop-GROUP', CLASS=K,MSGCLASS=T,NOTIFY=&userid
RESTART=STEP2,COND=(0,LE)
.
.
//step1 exec pgm=pgm1
//step2 exec pgm=pgm2,COND=(4095,GE)
//step3 exec pgm=pgm3
I believe there may be another method to do this, just we need to check!
Pankaj |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Please search the forum before you post..
The method to execute STEP2 in a JCL containing 3 steps as Step1,Step2 and Step3.
Please use the COND parameter as COND=ONLY in the steps that you don't want to execute.In this case code it in Steps 1 and 3.
You will get the desired result.. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Using COND=ONLY is not such a good idea, what happens if STEP2 abends ??? |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Amit wrote
Quote: |
But what I want is that whatever happens to Step 2, Step 1 and Step 3 are not executed.
Hope I am clear on this. |
So His requirement is Step 2 can come out with any type of result but No Step 3 execution...
I am not sure what you mean by IF Step 2 abends? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
COND=ONLY states that this step will ONLY process if a previous step abends. So if his STEP2 abends Sx37 then STEP3 WILL be processed. |
|
Back to top |
|
|
pankaj_kulkarni111
New User
Joined: 17 Aug 2006 Posts: 13 Location: Pune
|
|
|
|
muthuvel, i m sorry but pls revise the jcl once..
Pankaj |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Thanks for the correction.. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
Back to top |
|
|
|