COBOL74 Library: OBJECT/SAMPLE5

The following COBOL74 library is referenced in various examples in this section. This library is TEMPORARY; therefore, when it is no longer in use it unfreezes and resumes running as a regular program. The FEDLEVEL option is set to 5 to allow the PROGRAM-ID to be used as the entry point name.

$ SET FEDLEVEL = 5
  $ SET TEMPORARY
   IDENTIFICATION DIVISION.
   PROGRAM-ID. ENTRYPOINT.
   ENVIRONMENT DIVISION.
   DATA DIVISION.
   WORKING-STORAGE SECTION.
   77 PARAM PIC 9(11) COMP.
   PROCEDURE DIVISION USING INTEGER (PARAM).
   P1.
        DISPLAY “I AM SAMPLE5”.
        DISPLAY “MY PARAMETER IS “ PARAM.
        EXIT PROGRAM.