Skip to Content
Custom Search

COBOL PERFORM WITH TEST BEFORE

 

PERFORM WITH TEST BEFORE UNTIL
 
The following COBOL program depicts the use of 
PERFORM WITH TEST BEFORE UNTIL
 
 
       IDENTIFICATION DIVISION.
       PROGRAM-ID. PGM016.
       AUTHOR. MAINFRAMEWIZARD.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 WS-SUB   PIC 9 VALUE ZEROS.
       PROCEDURE DIVISION.
       10000-MAIN-PARA.
             MOVE 5 TO WS-SUB.
             PERFORM 20000-FIRST-PARA WITH TEST BEFORE UNTIL WS-SUB=5
             DISPLAY 'PARA NAME IS  10000-FIRST-PARA'
             STOP RUN.
       20000-FIRST-PARA.
             DISPLAY 'PARA NAME IS  20000-FIRST-PARA'.
             ADD +1 TO WS-SUB.
 
 
 
The ouput of the above program is 
 
PARA NAME IS  10000-FIRST-PARA                                                                                           

Comments

pls give us correct example...

pls give us correct example...

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 1 user and 44 guests online.

Online users

  • siteadmin
Dr. Radut | page