External: If declare any variable as external, it can be referenced by including program(outer) in nested programs.
PROGRAM-ID. pgm1 IS COMMAN PROGRAM.
This is an extention in cob-85 for nested programs. The program defined as ‘common’ can be called by any program in run unit(nested programs).
PROGRAM-ID. pgm1 IS INITIAL.
If we declare as “initial”, this will be available as initial state whenever it is called.
CALL ‘pgm2’ USING J
To Cancel “initial” state:
The program which is defined as Initial, get cancel implicitly without END-CALL.
To Cancel “Common: state:
The program which is defined as “common”, to get cancel its common state, need to mention END-CALL.