Basic program in COBOL with example

Category > COBOL || Published on : Friday, May 8, 2015 || Views: 2873 || Hello world Program in COBOL Basic Program in COBOL Starting Program in COBOL


 This example program is almost the shortest COBOL program we can have. We could make it shorter still by leaving out the STOP RUN.

Source Code for the above example:-

      $ SET SOURCEFORMAT"FREE"
IDENTIFICATION DIVISION.
PROGRAM-ID.  ShortestProgram.

PROCEDURE DIVISION.
DisplayPrompt.
    DISPLAY "I did it".
    STOP RUN.