Hello World

5 Jun

Every programming blog must include a “Hello World” program, right?   Here’s what is required to display “Hello World” in COBOL.

      IDENTIFICATION DIVISION.
      PROGRAM-ID.  HELLO_WORLD.
      ENVIRONMENT DIVISION.
      DATA DIVISION.
      WORKING-STORAGE SECTION.
      PROCEDURE DIVISION.
      010-DISPLAY.
          DISPLAY "Hello World".
          STOP RUN.
hello_world.cob
Yes, indeed, COBOL is verbose, but still lovable…

 

Leave a Reply

Your email address will not be published. Required fields are marked *