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
 

 

In IF LOOP If WE specify TRUE what does it mean

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

New User


Joined: 09 Jun 2005
Posts: 6
Location: CHENNAI

PostPosted: Thu Jun 09, 2005 5:28 am    Post subject:
Reply with quote

Hi,

In IF LOOP If WE specify TRUE what it means?

For this loop when ELSE CONDITION WORKS?

//STEP1 IF TRUE THEN
//COB2 EXEC PGM=PGM1,COND=(0,NE)
STATEMENTS
//ELSPART ELSE
//COB3 EXEC PGM=PGM2,COND=(0,NE)
STATEMENTS
//ENDPART ENDIF
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: Thu Jun 09, 2005 5:02 pm    Post subject: Re: In IF LOOP If WE specify TRUE what does it mean
Reply with quote

Manickam, what is this? It isn't JCL, since JCL doesn't look like your example. Is it supposed to represent some type of programming language?
Back to top
View user's profile Send private message
kasi_manickam

New User


Joined: 09 Jun 2005
Posts: 6
Location: CHENNAI

PostPosted: Thu Jun 09, 2005 5:59 pm    Post subject: REGARDING TRUE KEYWORD IN IF STATEMENT.
Reply with quote

Hi,

Sorry for objecting your statement.

Like this type of code runs fine in our code in JCL.

It Never bothers about the previous return code and always go inside of TRUE LOOP.

1.)Whether this is compiler dependant ?

2.) When it will go for Else Loop?

3.) Which type of situation we use like this type of Loop?
Back to top
View user's profile Send private message
gpraveen

New User


Joined: 10 Jun 2005
Posts: 1

PostPosted: Fri Jun 10, 2005 9:04 pm    Post subject: Re: In IF LOOP If WE specify TRUE what does it mean
Reply with quote

Yep, your JCL with the IF..THEN is perfectly fine. Version 4 and above of MVS/ESA does suppport this form of executing steps conditionally, thereby trying to make redundant the older method of using COND=(4,GE) and the like.

Moreover, the IF should be followed by a relational expression like
// IF STEP1.RC=0 THEN

Whereas, in your example, there is no condition. Therefore, it will always go into the IF part and never to the ELSE part.
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 save SAY var loop. italo_pm CLIST & REXX 3 Sun Sep 04, 2016 3:06 am
No new posts print out the correct info in LOOP? jackzhang75 CLIST & REXX 7 Wed Dec 23, 2015 10:39 pm
No new posts Using different values for Skeleton d... venksiv CLIST & REXX 8 Thu Sep 03, 2015 5:28 pm
No new posts Issue with Do Loop. santosh_g CLIST & REXX 5 Tue May 12, 2015 9:24 am
No new posts A cursor within a multi-fetch cursor ... Rohit Umarjikar DB2 1 Thu Mar 06, 2014 9:43 am


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