(call_sub_addr) — invocation for subroutines by address

This invocation of CEEPIPI invokes a specified routine as a subroutine. The common runtime environment identified by token is activated before the called routine is invoked; after the called routine returns, the environment is dormant.

The enclave is terminated when an unhandled condition is encountered or a STOP or EXIT statement (or an exit() function) is executed. (See Stop semantics for more information.) However, the process level is maintained; only the enclave level terminates.

Read syntax diagramSkip visual syntax diagram
Syntax

>>-CALL--CEEPIPI--(--call_sub_addr--,--routine_addr--,--token--,-->

>--parm_ptr--,--sub_ret_code--,--sub_reason_code--,------------->

>--sub_feedback_code--)----------------------------------------><

call_sub_addr (input)
A fullword function code (integer value = 10) containing the call_sub request for a subroutine.
routine_addr (input/output)
A doubleword containing the address of the routine that should be invoked. The first fullword contains the entry point address.
Note:
  1. If this is an XPLINK environment and the second fullword is zero, Preinitialization services will create a new function pointer to call the routine directly. The new function pointer will be returned in the second fullword.
  2. If this is an XPLINK environment and the second fullword is a function pointer, the XPLINK subroutine is called directly. This fast path avoids the overhead of translating the routine address to the function pointer.
token (input)
A fullword with the value of the token returned by (init_sub) or (init_sub_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. You must not alter the value of the token.
Note: If the token pointing to the previously preinitialized environment is a non-XPLINK environment and the subprogram to be invoked is XPLINK, then a return code of 40 will be returned because this is not valid.
parm_ptr (input)
A parameter list pointer or 0 (zero) that is placed in register 1 when the routine is executed.

C and C++ users are advised to follow the subroutine linkage convention for C/C++ — assembler ILC applications, as described in z/OS XL C/C++ Programming Guide.

sub_ret_code (output)
The subroutine return code. If the enclave is terminated due to an unhandled condition or a STOP or EXIT statement (or an exit() function), this contains the enclave return code for termination.
sub_reason_code (output)
The subroutine reason code. This is 0 for normal subroutine returns. If the enclave is terminated due to an unhandled condition or a STOP or EXIT statement (or an exit() function), this contains the enclave reason code for termination.
sub_feedback_code (output)
The feedback code for enclave termination. This is the CEE000 feedback code for normal subroutine returns. If the enclave is terminated due to an unhandled condition or a STOP or EXIT statement (or an exit() function), this contains the enclave feedback code for termination.