Loading

COBOL – PERFORM a SECTION

Below sample COBOL program explains how to PERFORM a SECTION.

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
       IDENTIFICATION DIVISION.       
       PROGRAM-ID.    KARTEST5.       
      * perform a SECTION             
       ENVIRONMENT DIVISION.          
       DATA DIVISION.                 
       PROCEDURE DIVISION.            
           PERFORM MY-SECTION.        
           GOBACK.
       MY-SECTION SECTION.            
           DISPLAY 'INSIDE MY-SECTION'
           EXIT.

Output of this program will be

INSIDE MY-SECTION

Related Posts




blog comments powered by Disqus

There's 0 Comment So Far

Share your thoughts, leave a comment!