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

(0,LT) in COND


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

New User


Joined: 05 Dec 2005
Posts: 79

PostPosted: Thu Jul 08, 2010 3:38 pm
Reply with quote

Hi,

Please clarify me the below condition


Case1 :

STEP1 EXEC PGM=XXX
STEP2 EXEC PGM=XXY,COND=(0,LT)
STEP3 EXEC PGM=XXZ


case 2:

STEP1 EXEC PGM=XXX
STEP2 EXEC PGM=XXY,COND=(0,LE)
STEP3 EXEC PGM=XXZ

Here confirm whether STEP2 will run or bypass if return code from step1 is zero in both the scenarios.

I know in 2nd case, STEP2 will get bypassed if return code is 0 from STEP1. But in case 1??

Regards,
Prabha.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jul 08, 2010 3:40 pm
Reply with quote

Isn't this something that would take less time to test rather than ask ?
Back to top
View user's profile Send private message
anshul_gugnani

New User


Joined: 02 Nov 2009
Posts: 73
Location: Mumbai

PostPosted: Thu Jul 08, 2010 4:14 pm
Reply with quote

Hi,

In case 1 - step2 will run
In case 2 - step2 will be bypassed.

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

Global Moderator


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

PostPosted: Thu Jul 08, 2010 4:40 pm
Reply with quote

easy to remember,
if condition is true, step is bypassed.
Back to top
View user's profile Send private message
santy
Warnings : 1

New User


Joined: 19 Jul 2007
Posts: 22
Location: mumbai

PostPosted: Wed Sep 08, 2010 3:32 pm
Reply with quote

in
CASE1-
condition (Return code of step1 (i.e. zero) is not LT 0)
condition was not satisfied
that's y step2 will execute.

CASE2-
condition (Return code of step1 (i.e. zero) is LE 0)
condition was satisfied,
that's y step2 will bypass.

in sort to remember, COND condition is exactly performing vice versa to IF condition.

In COND, if condition satisfied then step will bypass and
in IF condition, if condition satisfied then step will excute.

hope this will clear your doubt. :)
Back to top
View user's profile Send private message
Elixir

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Mon Sep 13, 2010 7:11 pm
Reply with quote

Prabha wrote:
Hi,

Please clarify me the below condition


Case1 :

STEP1 EXEC PGM=XXX
STEP2 EXEC PGM=XXY,COND=(0,LT)
STEP3 EXEC PGM=XXZ


case 2:

STEP1 EXEC PGM=XXX
STEP2 EXEC PGM=XXY,COND=(0,LE)
STEP3 EXEC PGM=XXZ

Here confirm whether STEP2 will run or bypass if return code from step1 is zero in both the scenarios.

I know in 2nd case, STEP2 will get bypassed if return code is 0 from STEP1. But in case 1??

Regards,
Prabha.


Cond parameter in JCL is very useful to bypass or execute a STEP.

The syntax look like below,
(return-code-user-set-by-user,comparison-parameter,previous-step-return-code/stepname-whose-return-code-is-to-be-considered)

The Thumb rule is if the conditon is not satisfied, the step is executed.
If the condition is satisfied the step is bypassed.

How it works in your examples?????.....


Case1 :

I) if the return-code of step1 is 0, (0,LT,0) is false. So step2 will be executed.

II) if the retrun-code of step1 is non-zero( i. e) greater the 0, in that case
(0,LT,A) {where A>0} is true. So step2 will be bypassed.

Case2 :

In this case (0,LT,B) {where B=0,1,2...} will always be satisfied. So this condition gets satisfied and step2 will be always bypassed.

Also COND has lot of other parameters also. It would be better to go through the JCL manuals to get a better hold of it.

Kindly let me know for any thing more on it icon_arrow.gif
Back to top
View user's profile Send private message
ranisupriya

New User


Joined: 03 Jul 2009
Posts: 3
Location: bangalore

PostPosted: Wed Sep 29, 2010 8:06 pm
Reply with quote

In Case 1 : Step 2 will execute. Condition given (0,LT) means if RC of step 1 is less than 0 step 2 should not run. But RC of step1 is 0 and 0 is not less than 0 so condtion is not true so Step 2 will execute.
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 Reference for COND parameter. JCL & VSAM 1
No new posts IEF142I and Cond. Code 12 All Other Mainframe Topics 3
No new posts Cond parameter and Rc code of a proce... JCL & VSAM 5
No new posts INCLUDE COND with WHEN=GROUP SYNCSORT 12
Search our Forums:

Back to Top