Testing the installation

To test the product installation and the critical search paths, try building, compiling, and running a simple program.

For example:

  1. Create the following COBOL program:
    [hello.cbl]
    000100  IDENTIFICATION DIVISION.
    000200  PROGRAM-ID.  HELLO.
    000300  AUTHOR.      JOE PROGRAMMER.
    000400  ENVIRONMENT DIVISION.
    000500  DATA DIVISION.
    000600  PROCEDURE DIVISION.
    000700  MAINLINE.
    000800      DISPLAY 'Hello World!'.
    000900      STOP RUN.
  2. Compile the test program. For example:
    cob2 hello.cbl -o hello
  3. Run the program:
    ./hello

    The expected result is that "Hello World!" is displayed on the screen.

  4. Check the exit code of the program:
    echo $?

    The result should be zero.