COBOL Manual for TNS and TNS/R Programs
Program Execution
HP COBOL Manual for TNS and TNS/R Programs—522555-006
12-24
Initial State
Initial State
Every program in a run unit has an initial state in which a process places it at certain
times while the run unit executes.
When a program is in its initial state:
•
Each data item in the Linkage Section has the value specified by the calling
program.
•
Each Working-Storage or Extended-Storage data item that is described with a
VALUE clause (except level-88 condition-names) has the specified value.
•
The value of each data item in the Working-Storage Section or the Extended-
Storage Section that is not described with a VALUE clause depends on whether
the NOBLANK directive was active during compilation. If not, each data item has a
space character (octal 40) in each character position or (for a COMPUTATIONAL,
COMPUTATIONAL-3, or COMPUTATIONAL-5 data item) a value consisting of a
series of space characters interpreted as a binary number. If the NOBLANK
directive was active during compilation, the value of each data item is
unpredictable.
•
The open mode of each internal file connector is either Closed or Locked. The
other dynamic attributes of the file connector (such as the file position indicator
setting) and the contents of the record area for the file associated with the file
connector are undefined.
•
The control mechanisms for all PERFORM statements in the program are set to
their initial state (inactive).
•
GO TO statements whose destinations can be modified by ALTER statements are
restored to the forms specified in the source program.
A program is placed in its initial state at these times:
•
The first time the program is executed in a run unit. For a main program, this is at
the beginning of each separate execution of the run unit. For a called program, this
is the first time it is called by a CALL statement during each execution of the run
unit.
•
The first time the program is called after a CANCEL statement cancels it.
•
For an initial program, each time it is called.