COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-18
CALL
•
paragraph-name in an Independent Segment
If paragraph-name is in an independent segment (a section whose segment-
number is greater than 49), these restrictions apply:
°
Every ALTER statement that references the paragraph-name must be in a
section that has the same segment-number as the section containing
paragraph-name.
°
If the destination is in a section that does not have the same segment-
number as the section containing paragraph-name, these restrictions apply:
°
An ALTER statement in the Declaratives Portion cannot refer to a
paragraph-name or destination in the other portion of the
Procedure Division.
°
An ALTER statement cannot be used to establish a potential transfer of
control between the Declaratives Portion and the other portion of the
Procedure Division.
°
An ALTER statement cannot refer to a paragraph-name or
destination in any debugging declarative procedure unless the ALTER
statement itself is in a debugging declarative procedure.
°
An ALTER statement cannot be used to establish a potential transfer of
control between a debugging declarative procedure and a nondebugging
declarative procedure.
•
Canceling the Effects of ALTER Statements
The effect of an ALTER statement persists until the execution of either:
°
Another ALTER statement with the same destination
°
A CANCEL statement in which program-name is the program containing the
paragraph in which destination appears.
CALL
CALL’s behavior is determined by the PORT directive. If the program is not compiled
with the PORT directive, CALL transfers control from one COBOL program to another
COBOL program. The called program can be in the current compilation unit or can be
extracted from an object file, provided that the entry point called is in a code block
created by a COBOL compiler on an HP system. To transfer control from a COBOL
program to a program written in another language in the absence of the PORT
directive, use ENTER (see ENTER).
If the program is compiled with the PORT directive and runs in the CRE, CALL
behaves like the X/Open CALL statement (which is not an element of COBOL). The