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

Specifying COND=(0,LT) in FIRST Step


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

New User


Joined: 20 Jul 2005
Posts: 14

PostPosted: Wed Jul 20, 2005 2:33 pm
Reply with quote

Hi,
in my jcl i given COND parameter in first step.
Ex:-
//Job1-------------
//step1-------cond=(0,lt)
//step2--------
---
----
//step10
//
what will happen if i submitted this job
thanks ganga
Back to top
View user's profile Send private message
KAUSHIK RANGARAJAN

New User


Joined: 19 Jul 2005
Posts: 22
Location: chennai

PostPosted: Wed Jul 20, 2005 4:25 pm
Reply with quote

Hi,

I think U will get a JCL ERROR.
Conditions are ment to be used if U have multiple Steps and cases where Exection of One Step depends On the Successfull completion of the other.
It will work if U give the Condition Command in the second step or Succedding steps.

Correct me if I am wrong.

BYE. icon_rolleyes.gif icon_rolleyes.gif
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Jul 20, 2005 4:35 pm
Reply with quote

Hi KAUSHIK,

Quote:
I think U will get a JCL ERROR.


It worked fine for me....

Regards,

Priyesh.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Jul 20, 2005 4:37 pm
Reply with quote

I meant the job went fine for me....without any Error....

Regards,

Priyesh.
Back to top
View user's profile Send private message
KAUSHIK RANGARAJAN

New User


Joined: 19 Jul 2005
Posts: 22
Location: chennai

PostPosted: Wed Jul 20, 2005 4:48 pm
Reply with quote

Hi Priyesh,

I was under the thought that CONDITIONS can be used in case of Jobs having more than one step. How come this is possible? Can U Explain Please.

Thanks. icon_rolleyes.gif
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Jul 20, 2005 5:11 pm
Reply with quote

Hi KAUSHIK,

I was under the thought that CONDITIONS can be used in case of Jobs having more than one step
Quote:


Its not like that...

Quote:
How come this is possible?


icon_rolleyes.gif .....I dont know....

Quote:
Can U Explain Please.


See ....Can you get a RC less than zero....If no....then the condition given is not going to stop the step1 to get executed...

Regards,

Priyesh.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jul 20, 2005 5:56 pm
Reply with quote

Also, don't forget that the first step MUST execute (it cannot be bypassed unless the RESTART= parameter is used), so there is no benefit of coding a condition for the first step.
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Wed Jul 20, 2005 9:24 pm
Reply with quote

Just to add Somemore on Kevin's post

Quote:
Conditions are ment to be used if U have multiple Steps and cases where Exection of One Step depends On the Successfull completion of the other.


Yes Kaushik! Cond parameter is helpful for that. But if it is coded in the first step, as there are no previous steps, It can't validate any step. We will not get JCL error even. Coding Cond parameter in first step is just like coding the first step without any cond parameter.

Quote:
See ....Can you get a RC less than zero....If no....then the condition given is not going to stop the step1 to get executed...


Priyesh! looks you understood the COND parameter in other way round. If Cond=(0,LT) is coded in any step, then it will not look for the return codes less than zero. It will see if 0 is less than any of the previous steps return code, the current step should not be executed.

Quote:
in my jcl i given COND parameter in first step.
Ex:-
//Job1-------------
//step1-------cond=(0,lt)
//step2--------
---
----
//step10
//
what will happen if i submitted this job


Ganga! Hope now you understood what is the result.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Jul 20, 2005 9:32 pm
Reply with quote

Thanks for the clarification ANU....

Regards,

Priyesh,
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Jul 21, 2005 4:28 am
Reply with quote

It looks like a case of "no harm, no foul". icon_smile.gif
Back to top
View user's profile Send private message
dneufarth

Active User


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

PostPosted: Thu Jul 21, 2005 5:55 am
Reply with quote

from the JCL manual

"The system evaluates a COND parameter on the first EXEC statement in a job as false. However, you can use an IF statement before the first EXEC statement in a job to bypass the step."


Dave
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
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
Search our Forums:

Back to Top