Cobol-Global, Initial, External,Common

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.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.