Hello World Program
Problem Description
Write a COBOL program that displays "HELLO, MAINFRAME WORLD!" on the screen.
Expected Output
HELLO, MAINFRAME WORLD!
Hints
Use DISPLAY statement. Remember the basic COBOL divisions.
Solution
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
PROCEDURE DIVISION.
DISPLAY "HELLO, MAINFRAME WORLD!".
STOP RUN.
Explanation:
IDENTIFICATION DIVISION identifies the program. PROCEDURE DIVISION contains executable code.