View previous topic :: View next topic
|
Author |
Message |
gangas
New User
Joined: 20 Jul 2005 Posts: 14
|
|
|
|
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 |
|
|
KAUSHIK RANGARAJAN
New User
Joined: 19 Jul 2005 Posts: 22 Location: chennai
|
|
|
|
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. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Hi KAUSHIK,
Quote: |
I think U will get a JCL ERROR. |
It worked fine for me....
Regards,
Priyesh. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
I meant the job went fine for me....without any Error....
Regards,
Priyesh. |
|
Back to top |
|
|
KAUSHIK RANGARAJAN
New User
Joined: 19 Jul 2005 Posts: 22 Location: chennai
|
|
|
|
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. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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? |
.....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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
anuradha
Active User
Joined: 06 Jan 2004 Posts: 247 Location: Hyderabad
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Thanks for the clarification ANU....
Regards,
Priyesh, |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
It looks like a case of "no harm, no foul". |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
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 |
|
|
|