Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identification Division

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Can we have 2 IDENTIFICATION DIVISIONS within a program?
 
You can have two IDENTIFICATION DIVISIONS if you have nested source programs. A source program may contain other other source programs; these contained programs may reference some of the resources of the program within which they are contained.

IDENTIFICATION DIVISION.
PROGRAM-ID. X.
REMARKS. Nested Calling Program.
PROCEDURE DIVISION.
A.
CALL "Y".
STOP RUN.

IDENTIFICATION DIVISION.
PROGRAM-ID. Y.
REMARKS. Nested Called Program.
PROCEDURE DIVISION.
A.
DISPLAY "Hello World".
EXIT PROGRAM.
END PROGRAM Y.

END PROGRAM X.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top