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
 
break statement in easytrieve do/while loop?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: break statement in easytrieve do/while loop?
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    Post subject: Re: break statement in easytrieve do/while loop?
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compute statement with Cobol Z/os 5.2 Chetan Kumar COBOL Programming 2 Fri May 11, 2018 8:02 pm
No new posts Detect break in the sequence tuxama DFSORT/ICETOOL 6 Tue Mar 20, 2018 1:35 pm
No new posts Easytrieve with SQL Jan Olav Pedersen CA Products 1 Tue Jan 23, 2018 7:29 pm
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm

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