View previous topic :: View next topic
|
Author |
Message |
soumyanamboo
New User
Joined: 16 Apr 2008 Posts: 13 Location: Chennai
|
|
|
|
I have 5 steps in a job. I don't want to execute step 3. How to skip step 3 from execution, without any condition? |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
remove it from the job
Gerry |
|
Back to top |
|
|
Ketan Varhade
Active User
Joined: 29 Jun 2009 Posts: 197 Location: Mumbai
|
|
|
|
I think u need to add a condition for the above task and check for the return code and execute on the desired step. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
What do you mean by "without any condition" |
|
Back to top |
|
|
soumyanamboo
New User
Joined: 16 Apr 2008 Posts: 13 Location: Chennai
|
|
|
|
the steps are part of a proc and in 1 case i need to execute all the steps. In another case, i don't want to execute step 3. It is not based on any condition or return code for the second case. In any ways, i don't want to run step 3. I cant remove the step from proc, because it is used in another Job, which requires all the steps...
Hope the requirement is clear... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Please read the section regarding COND in the JCL reference manual, easily reached by using the "IBM Manuals" button at the top of each page.
If there are any problems with what you read, please come back and ask for clarification. |
|
Back to top |
|
|
Amolondhe007 Warnings : 1 New User
Joined: 16 Apr 2007 Posts: 49 Location: Pune
|
|
|
|
Soumyanamboo,
Could you please try below JCL Code...It might work.
USE IEBEDIT utility to perform above condition:
//Job Card
//STEP001 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXX.GENERAL.STUDY(TEST001),DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=(STEP01,STEP02,STEP04)
/*
Thanks,
Amol
Pune,India. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Amolondhe007 wrote: |
Could you please try below JCL Code...It might work |
But then again, it might not work.
Did you try it before posting ? |
|
Back to top |
|
|
Pankaj Shrivastava Currently Banned New User
Joined: 24 Jul 2009 Posts: 51 Location: Pune
|
|
|
|
Appy this COND on step 3 : COND=(0,LT). In other case obverwrite it in proc with (0,GE) |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Ho hum
Code: |
//PROCNAME EXEC PROC,COND.STEP3=(0,LE) |
|
|
Back to top |
|
|
viveksurya
New User
Joined: 08 Jun 2009 Posts: 36 Location: Bangalore
|
|
|
|
Assuming that you never want STEP 03 to be executed, give the COND=(0,LT) in the STEP 03 exec statement. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
viveksurya wrote: |
Assuming that you never want STEP 03 to be executed, give the COND=(0,LT) in the STEP 03 exec statement. |
WRONG WRONG WRONG
What happens if all of the previous return codes are zero.
Zero can never be less than zero, so the condition will not be satisfied and the step will process.
Please take the time to test code before posting it
And also to read the previous replies, where 0,LE is the correct solution. |
|
Back to top |
|
|
sandeep chourasia
New User
Joined: 27 Aug 2009 Posts: 3 Location: India
|
|
|
|
PASS COND.STEP03=(0,LE) from JCL |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
PASS COND.STEP03=(0,LE) from JCL |
And this needed repeating because . . . ? |
|
Back to top |
|
|
|