Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
(0,LT) in COND

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: (0,LT) in COND
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 08, 2010 3:40 pm    Post subject:
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    Post subject: Reply to: (0,LT) in COND
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: 6968
Location: porcelain throne

PostPosted: Thu Jul 08, 2010 4:40 pm    Post subject:
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    Post subject: Reply to: (0,LT) in COND
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    Post subject: Re: (0,LT) in COND
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    Post subject:
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    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 COND parameter vs IF THEN ELSE Alks JCL & VSAM 11 Fri Jun 17, 2016 5:28 pm
No new posts Include Cond issue vickey_dw DFSORT/ICETOOL 6 Tue Mar 29, 2016 8:51 pm
No new posts How to detect the Job COND used tdfs JCL & VSAM 28 Tue Feb 09, 2016 8:34 pm
No new posts Repeating input records for variable ... ksouren007 DFSORT/ICETOOL 1 Fri Jul 31, 2015 4:16 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us