IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to skip a job step unconditionally


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
soumyanamboo

New User


Joined: 16 Apr 2008
Posts: 13
Location: Chennai

PostPosted: Thu Aug 13, 2009 12:33 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Aug 13, 2009 12:36 pm
Reply with quote

Hi,

remove it from the job


Gerry
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Thu Aug 13, 2009 12:36 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 13, 2009 12:36 pm
Reply with quote

What do you mean by "without any condition"
Back to top
View user's profile Send private message
soumyanamboo

New User


Joined: 16 Apr 2008
Posts: 13
Location: Chennai

PostPosted: Thu Aug 13, 2009 12:47 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 13, 2009 12:56 pm
Reply with quote

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
View user's profile Send private message
Amolondhe007
Warnings : 1

New User


Joined: 16 Apr 2007
Posts: 49
Location: Pune

PostPosted: Thu Aug 13, 2009 1:03 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 13, 2009 1:14 pm
Reply with quote

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
View user's profile Send private message
Pankaj Shrivastava
Currently Banned

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Thu Aug 13, 2009 2:38 pm
Reply with quote

Appy this COND on step 3 : COND=(0,LT). In other case obverwrite it in proc with (0,GE)
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 13, 2009 2:46 pm
Reply with quote

Ho hum
Code:

//PROCNAME EXEC PROC,COND.STEP3=(0,LE)
Back to top
View user's profile Send private message
viveksurya

New User


Joined: 08 Jun 2009
Posts: 36
Location: Bangalore

PostPosted: Fri Aug 14, 2009 4:09 pm
Reply with quote

Assuming that you never want STEP 03 to be executed, give the COND=(0,LT) in the STEP 03 exec statement.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 14, 2009 4:13 pm
Reply with quote

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 icon_evil.gif
And also to read the previous replies, where 0,LE is the correct solution.
Back to top
View user's profile Send private message
sandeep chourasia

New User


Joined: 27 Aug 2009
Posts: 3
Location: India

PostPosted: Fri Aug 28, 2009 12:44 am
Reply with quote

PASS COND.STEP03=(0,LE) from JCL
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 28, 2009 3:35 am
Reply with quote

Hello,

Quote:
PASS COND.STEP03=(0,LE) from JCL
And this needed repeating because . . . ?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Forcing a step to run (even if abended) JCL & VSAM 8
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
Search our Forums:

Back to Top