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
 
Confusion regarding Test After condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rupesh gullu

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Thu Apr 16, 2009 2:16 pm    Post subject: Confusion regarding Test After condition
Reply with quote

Hi,

I have following code and i want to knwo how many times 100-main-para
and 200-new-para are ececuted.

Code:
MOVE 1 TO CTR.
PERFORM 100-MAIN-PARA UNTIL CTR>20
100-MAIN-PARA.
  ADD 1 TO CTR.
  PERFORM 200-NEW-PARA WITH TEST AFTER UNTIL CTR>10
100-EXIT
      EXIT.
200-NEW-PARA.
  ADD 1 to CTR.
200-EXIT.
      EXIT.


Please explain the process.

regards,
rupesh gupta
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Apr 16, 2009 2:24 pm    Post subject: Reply to: Confusion regarding Test After condition
Reply with quote

add two new counters, and at the end display them
simple and effective, no speculations or wild guessings
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Z/OS hosted on Linux (zDT) or zVM - T... Pete Wilson All Other Mainframe Topics 0 Tue Sep 26, 2017 2:06 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Confusion b/w index and subscript Deepak kumar25 Mainframe Interview Questions 7 Thu Aug 31, 2017 6:50 am
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am

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