Language Environment preinitialization services for the main program environment allow you to initialize the runtime environment for a main program by using the CEEPIPI(INIT_MAIN ...) service, to call programs as main by using the CEEPIPI(CALL ...) service, and to terminate the preinitialized environment using the CEEPIPI(TERM ...) service.
To use the Language Environment preinitialization main program services, VS COBOL II programs and OS/VS COBOL programs cannot be the target of CEEPIPI(CALL ...). However VS COBOL II programs and OS/VS COBOL programs can be the target of any COBOL CALL statements in a preinitialized environment.
When you run an application under the VS COBOL II run time, the data sets used by the functions ACCEPT SYSIN, DISPLAY SYSOUT, and DISPLAY SYSPUNCH are closed after the completion of each invocation of a main program. Thus, the data set content is externally available. For example, in the z/OS batch environment, closing SYSOUT commonly causes its data to become part of the JOB output. Also, the runtime messages and dumps can be received at the end of each execution.
When running with the Language Environment preinitialization facility for the main program environment, those files plus MSGFILE and dump files will not be closed until CEEPIPI(TERM) is issued to terminate the preinitialized environment.
For more information on Language Environment preinitialized services, including information on how to initialize the runtime environment for subprograms, see the Language Environment Programming Guide.