Loading
Filed Under: COBOL
COBOL – Hello World program
Below sample cobol program has the minimal set of statements required. It contains all the four divisions and PROGRAM-ID is a mandatory statement which will have the program name.
IDENTIFICATION DIVISION
ENVIRONMENT DIVISION
DATA DIVISION
PROCEDURE DIVISION
Divisions – > Section –> Paragraph –> Statement.
----+----1----+----2----+----3----+----4----+----5----+----6----+----7-- IDENTIFICATION DIVISION. PROGRAM-ID. KARTEST2. ENVIRONMENT DIVISION. DATA DIVISION. PROCEDURE DIVISION. DISPLAY 'HELLO WORLD ! ' . GOBACK.
Output of this program will be
HELLO WORLD !
Related Posts
- Cobol Code analyser
- COBOL – PERFORM a SECTION
- COBOL – IF ELSE ENDIF statement
- COBOL–Working storage variables
- STRING and UNSTRING verbs in COBOL
blog comments powered by Disqus
There's 0 Comment So Far
Share your thoughts, leave a comment!