Use the following interface to terminate the preinitialized persistent COBOL environment.
| CALL term_routine syntax |
|---|
|
The first COBOL program called after the invocation of the preinitialization routine is treated as a subprogram. Thus a GOBACK from this (initial) program does not trigger run-unit termination semantics such as the closing of files. Run-unit termination (such as with STOP RUN) does free the preinitialized COBOL environment prior to the invocation of the run-unit exit routine.
If not active: If your program invokes the termination routine and the COBOL environment is not already active, the invocation has no effect on execution, and control is returned to the invoker with an error code of 0.
Example: preinitializing the COBOL environment
related references
Call interface conventions