(call_main) — invocation for main routine

This invocation of CEEPIPI invokes as a main routine the routine that you specify. The common execution environment identified by token is activated before the called routine is invoked, and after the called routine returns, the environment is dormant.

At termination, the currently active HLL event handlers are driven to enforce language semantics for the termination of an application such as closing files and freeing storage. The process level is made dormant rather than terminated. The thread and enclave levels are terminated. The assembler user exit is driven with the function code for first enclave termination. (For more information about user exits, see Using runtime user exits.)

Read syntax diagramSkip visual syntax diagram
Syntax

>>-CALL--CEEPIPI--(--call_main--,--ceexptl_index--,--token--,--->

>--runtime_opts--,--parm_ptr--,--enclave_return_code--,--------->

>--enclave_reason_code--,--appl_feedback_code--)---------------><

call_main (input)
A fullword function code (integer value = 2) containing the call_main request.
ceexptbl_index (input)
A fullword containing the row number within the PreInit table of the entry that should be invoked. The index starts at 0.

Each invocation of the CEEXPITY macro generates a row in the PreInit table. The first entry is row 0, the second is row 1 and so on. A call to (add_entry) to add an entry to the PreInit table also returns a row number in the ceexptbl_index parameter.

token (input)
A fullword with the value of the token returned by (init_main) or (init_main_dp) when the common runtime environment is initialized. The token must identify a previously preinitialized environment that is not active at the time of the call.
runtime_opts (input)
A fixed-length 255-character string containing runtime options. (See z/OS Language Environment Programming Reference for a list of runtime options that you can specify.)
parm_ptr (input)
A fullword parameter list pointer or 0 (zero) that is placed in register 1 when the main routine is executed. The parameter list that is passed must be in a format that HLL subroutines expect (for example, in an argc, argv format for C routines).
enclave_return_code (output)
A fullword containing the enclave return code returned by the called routine when it finished executing. For more information about return codes, see Managing return codes in Language Environment.
enclave_reason_code (output)
A fullword containing the enclave reason code returned by the environment when the routine finished executing. For more information about reason codes, see Managing return codes in Language Environment.
appl_feedback_code (output)
A 96-bit condition token indicating why the application terminated.