The following can be used in Nested programs, they have some hidden meanings.
As a Cobol developer one needs to learn latest things to keep ahead of others.
01 Data-1 PIC 9(5) is Global value zero.
This can be used in all included programs. Only at 01 level, FD, RD entries. In the included programs, we can use similar data name without Global, means that is local to that program.
01 Data-2 PIC 9(5) is External
It is similar to Global. You can not give value clause. Not to mention in REDEFINES.
PROGRAM-ID. PROGRAM-NAME IS COMMON PROGRAM INITIAL
- Common program can be called by all programs. But initial programs can be called only from the program that contains it.
- INITIAL program when it calls all the Special registers will be initialized.
You can read more information online here on GLOBAL, External and Initial parameters of COBOL.