Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Specifying COND=(0,LT) in FIRST Step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
gangas

New User


Joined: 20 Jul 2005
Posts: 15

PostPosted: Wed Jul 20, 2005 2:33 pm    Post subject: Specifying COND=(0,LT) in FIRST Step
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    Post subject: JCL
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: 1452
Location: Chicago, IL

PostPosted: Wed Jul 20, 2005 4:35 pm    Post subject: Re: JCL
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: 1452
Location: Chicago, IL

PostPosted: Wed Jul 20, 2005 4:37 pm    Post subject: Re: JCL
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    Post subject: JCL
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: 1452
Location: Chicago, IL

PostPosted: Wed Jul 20, 2005 5:11 pm    Post subject: Re: JCL
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

Moderator Team Head


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

PostPosted: Wed Jul 20, 2005 5:56 pm    Post subject: Re: JCL
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    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Wed Jul 20, 2005 9:32 pm    Post subject: Re: JCL
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    Post subject:
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: 239
Location: Cincinnati OH USA

PostPosted: Thu Jul 21, 2005 5:55 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts COND parameter vs IF THEN ELSE Alks JCL & VSAM 11 Fri Jun 17, 2016 5:28 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us