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

How to bypass a step always.


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

New User


Joined: 14 Sep 2005
Posts: 54
Location: Chennai

PostPosted: Thu May 06, 2010 7:22 pm
Reply with quote

Hi
I have a job with 5 steps.

and I want to skip the Step No: 5 always.
I don't want to execute the Step No:5 even previous steps fails or successfully executed.

How a can get this using COND CODE?

Thanks
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu May 06, 2010 7:26 pm
Reply with quote

I would say "easily", but that depends on the complexity of the JCL structure.

Is this step contained in instream JCL, a PROC, a nested PROC

What did you find confusing in the JCL reference manual when you read it for the COND parameter ?
Back to top
View user's profile Send private message
sashi

New User


Joined: 14 Sep 2005
Posts: 54
Location: Chennai

PostPosted: Thu May 06, 2010 7:31 pm
Reply with quote

expat wrote:
I would say "easily", but that depends on the complexity of the JCL structure.

Is this step contained in instream JCL, a PROC, a nested PROC

What did you find confusing in the JCL reference manual when you read it for the COND parameter ?


Nop it wont contain any PROCs,

it will create a handshake file on UNIX server.
As the server not yet ready we are planning to bypass the step always.
once its reaady I can delete the COND parameter so that it should run correctly...
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu May 06, 2010 7:43 pm
Reply with quote

Is the step in question, the step that you do not want to process, contained in instream JCl, a PROC or a nested PROC.

I did not ask what the step did, merely asked in which state that the JCL is in.
Back to top
View user's profile Send private message
sashi

New User


Joined: 14 Sep 2005
Posts: 54
Location: Chennai

PostPosted: Thu May 06, 2010 7:47 pm
Reply with quote

expat wrote:
Is the step in question, the step that you do not want to process, contained in instream JCl, a PROC or a nested PROC.

I did not ask what the step did, merely asked in which state that the JCL is in.

I think in the very first line I have said that it won't contain any PROC or instream JCL stats
its a last step in the JCl and It nothing realted to prev steps...
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu May 06, 2010 7:54 pm
Reply with quote

OK, let me try and put this in a simple manner that you may better understand.

The job that you submit, what does it look like

Is it instream JCL, i.e. that each and every step is shown as an EXEC card that has PGM= on it and then followed by its DD statements , or is it a PROC which has only one EXEC card without PGM= coded and has very few if any DD statement visible.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu May 06, 2010 7:58 pm
Reply with quote

I'll also give a try to this riddle (with lots of assumptions):

1. Make another JCL, which does not have this step altogther, till you get the server up.

2. Comment out this step from teh existing JCL/PROC/JOB.

3. Create another job using IEBEDIT, execute the steps of your choice.

4. Because it's the last step, you might include the "null-indicator" (//) in the JCL stream.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Thu May 06, 2010 8:25 pm
Reply with quote

If it is only pure JCL and NOT a PROC, then it is just as easy to comment out the step as it would be to add a COND parameter. However, if adding a COND parameter is really what you want to do, then try COND=(4095,GT) - this will cause STEP5 to be bypassed unless a) no abend occurred, and b) a previous step executed successfully and set an RC of 4095 or greater ( highly doubtful ).
Back to top
View user's profile Send private message
sashi

New User


Joined: 14 Sep 2005
Posts: 54
Location: Chennai

PostPosted: Thu May 06, 2010 10:36 pm
Reply with quote

Thanks for replays…....friends..

I got my answer..
just simply put a IF condition...


//IF RC < 0 THEN
//STEP5
//ENDIF

it will never execute step5.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu May 06, 2010 11:24 pm
Reply with quote

never understand why the necessity of using a COND code,
when commenting out the step is
  • so easy
  • so obvious
  • and will be require no more time to change than putting in a COND code
    • that will require processor time - where as comments require no processor time
    • and is confusing - since no one at your site knew to do this, no one will understand what is going on
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri May 07, 2010 2:54 am
Reply with quote

Goes along with all those classroom discussions of "how can I skip step3 in a 5 step job using only cond"?
Back to top
View user's profile Send private message
Sudhanshu Shekhar

New User


Joined: 23 Jul 2008
Posts: 27
Location: City of Joy

PostPosted: Fri May 07, 2010 10:25 am
Reply with quote

Quote:
never understand why the necessity of using a COND code,


DBZ COND Parameters are the only way out while dealing with procs.Commenting out a step would require modification of a proc which in turn would affect its reusability to a great extent.

If still looking for an answer try this.

Code:
COND.STEPNAME=(0,LE)


Give a COND Never allows the Step to run.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 07, 2010 10:31 am
Reply with quote

Just glanced in to see what this thread is about....

Quote:
DBZ COND Parameters are the only way out while dealing with procs.Commenting out a step would require modification

Even adding\removing condition codes also
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 May 07, 2010 10:37 am
Reply with quote

Hi Sambahji,

Not if the cond was placed on the exec statement.

The posted example should be more complete. . .
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 07, 2010 10:43 am
Reply with quote

Hi Dick.. My reply was referencing to Sashi's query..
He said
Quote:
I think in the very first line I have said that it won't contain any PROC or instream JCL stats
its a last step in the JCl and It nothing realted to prev steps...

In this case, anyways the JCL needs to be changed so I go with dbzTHEdinosauer's reply.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri May 07, 2010 4:15 pm
Reply with quote

If step 5 is the last step put /*EOF before the last step EXEC.
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 May 07, 2010 8:49 pm
Reply with quote

Hi Sambhaji,

Yup, There appear to be 2 separate conversations. . . icon_cool.gif

Hopefully, Sashi now has sufficient info. . .
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri May 07, 2010 9:26 pm
Reply with quote

Or a construction like this :

Code:

//NORUN   EXEC  PGM=IEFBR14 
//STEP05  EXEC  PGM=xxxxxxxx,COND=(0,LE) 
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