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

break statement in easytrieve do/while loop?


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
wagnj1

New User


Joined: 10 Mar 2005
Posts: 1

PostPosted: Thu Mar 10, 2005 8:38 pm
Reply with quote

I'm using a do/while loop in my easytrieve code and need it to break during a loop if a certain condition is met...is this possible?
Back to top
View user's profile Send private message
Girishm

New User


Joined: 09 Mar 2005
Posts: 35
Location: Mysore

PostPosted: Mon Mar 14, 2005 5:12 pm
Reply with quote

hi,
It is possible to break Do..While loop once your condition is met.
You need to code a go to statement, if your condition get satisfied.
For example consider the following code:
...
Do while NOT EOF (file-name)
...
...
...
...
IF dept = 420 (assume this as your break condition)
GO TO Continue (give a labeel name, to break the loop)
END-IF
...
...
END-DO

Continue.
..
.. (here your rest of the code)


Hope it helps you:)-
Girish
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 -> CA Products

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. REXX - Do - Not able to LOOP CLIST & REXX 10
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Count the number of characters in a f... CA Products 1
No new posts File matching functionality in Easytr... DFSORT/ICETOOL 14
No new posts REXX - Dataset checking in a do forev... CLIST & REXX 6
Search our Forums:

Back to Top