Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.05 KB

README.md

File metadata and controls

45 lines (33 loc) · 1.05 KB

COBOL never dies

<List>

  • COBOL requires crazy indentation rules
    (Reference ☞ [Wikipedia] COBOL > Features > Code format)

    • Comments must start with * in column 7
    • DIVISION, SECTION headers must start from column 8
    • Do not exceed column 80
  • Compiled by cobc (GnuCOBOL) 3.1.2.0 in replit

  • Codes and Output

    Codes : HelloWorld.cob
         * Hello World in COBOL
         * 2023.09.04
    
          IDENTIFICATION DIVISION.
              PROGRAM-ID. HelloWorld.
    
          DATA DIVISION.
              WORKING-STORAGE SECTION.
                  01 WS-HELLO-MESSAGE PIC X(13) VALUE 'Hello, World!'.
    
          PROCEDURE DIVISION.
              DISPLAY WS-HELLO-MESSAGE.
              STOP RUN.
    Output
    Hello, World!