COBOL Manual for TNS and TNS/R Programs

Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs522555-006
13-42
COBOL85^COMPLETION and
COBOL_COMPLETION_
termination-info
is a numeric operand, the evaluation of which includes truncation as necessary to
an integer result with a value in the range of -32,768 through 32,767. If this
parameter is present, the value is passed to STOP or ABEND as the
termination-info parameter for that routine.
subsys-id
is a data item occupying at least twelve character positions. If this parameter is
present, a reference to the data item is passed to STOP or ABEND as the
subsys-id parameter for that routine.
text-length
is a numeric operand, the evaluation of which includes truncation as necessary to
an integer result. If this parameter is present, the value is passed to STOP or
ABEND as the length parameter for that routine.
text
is an alphanumeric data item containing at least as many characters as specified
by the value of text-length (alphabetic and alphanumeric-edited data items are
also permissible). If this parameter is present, a reference to the data item is
passed to STOP or ABEND as the text parameter for that routine.
Usage Considerations:
Parameters Are Not Validated
When the run unit calls COBOL85^COMPLETION or COBOL_COMPLETION_, the
HP COBOL run-time routines terminate execution of the run unit in an orderly
fashion. The final step in the termination logic is to call either the STOP or the
ABEND routine of the operating environment (as specified by the implicit or explicit
abend-or-stop parameter value). All other parameters are made available to the
STOP or ABEND routine as described previously. It is the application’s
responsibility to verify that the combination of supplied parameters and their values
meet the expectations of the STOP or ABEND routine. Neither the
COBOL85^COMPLETION routine, the COBOL_COMPLETION_ routine, nor the
HP COBOL run-time routines validate the parameters.
Calling COBOL85^COMPLETION or COBOL_COMPLETION_ From the CRE
A CRE HP COBOL program can call either COBOL85^COMPLETION (the
COBOL-environment routine) or COBOL_COMPLETION_ (the equivalent CRE
routine). If it calls COBOL85^COMPLETION, it actually calls
COBOL_COMPLETION_ indirectly.
COBOL85^COMPLETION has the parameter text-length, but
COBOL_COMPLETION_ does not (the CRE gets the text length from the specified
text instead).