CEEPIPI — invocation for subroutine by address

Each invocation of CEEPIPI (call_sub_addr_nochk) or CEEPIPI (call_sub_addr_nochk2) invokes a specified routine by address, which is similar to CEEPIPI(call_sub_addr), but does not perform Language Environment anchor look-up, set, or reset. Both of these CWI interfaces to CEEPIPI are intended to be used when the Language Environment environment is initialized and terminated in one task control block (TCB) or address space but is used from a different TCB or from an SRB, in the same or a different address space.

Both CWIs are supported only in the CEEPIPI(init_sub_dp) environment, which must be initialized with TRAP(ON,NOSPIE), INTERRUPT(OFF), and NOTEST. If the CEEPIPI(init_sub_dp) interface is used to establish multiple Language Environment environments under the same address space, the routine must not use z/OS UNIX functions. For additional information, see z/OS XL C/C++ Runtime Library Reference.

The Language Environment environment identified by the token is activated before the called routine is invoked. After the called routine returns, the environment is dormant.

Syntax

call CEEPIPI (call_sub_addr_nochk, routine_addr, token, parm_ptr, sub_ret_code, sub_reason_code, sub_feedback_code)

INT4     *call_sub_addr_nochk;
POINTER  *routine_addr;
INT4     *token;
POINTER  *parm_ptr;
INT4     *sub_ret_code;
INT4     *sub_reason_code;
INT4     *sub_feedback_code;

Syntax

call CEEPIPI (call_sub_addr_nochk2, routine_addr, token, parm_ptr, sub_ret_code, sub_reason_code, sub_feedback_code)

INT4     *call_sub_addr_nochk2;
POINTER  *routine_addr;
INT4     *token;
POINTER  *parm_ptr;
INT4     *sub_ret_code;
INT4     *sub_reason_code;
INT4     *sub_feedback_code;
call_sub_addr_nochk (input)
a fullword function code (integer value of 12) that specifies the CEEPIPI request for calling a C main routine and obtaining writable static. The routine_addr specified must be CEESTART. The entry point called will then be the main entry point specified in the CEEMAIN referenced by that CEESTART. For more information on CEESTART and CEEMAIN, see CEESTART and CEEMAIN and z/OS XL C/C++ User's Guide.
call_sub_addr_nochk2 (input)
a fullword function code (integer value of 14) that specifies the CEEPIPI request for calling a C, C++, PL/I, or Language Environment-conforming assembler subroutine.
routine_addr (input)
a doubleword containing the address of the routine that should be invoked. The first fullword contains the entry point address; the second fullword must be zero.
token (input)
a fullword with the value of the token returned by CEEPIPI(init_sub_dp) when the Language Environment environment is initialized. The token must identify a previously pre-initialized environment that is not active at the time of call. You must not alter the value of the token.
parm_ptr (input)
a parameter list pointer or 0 (zero) that is placed in register 1 when the routine is executed. Runtime options are not obtained from this parameter.
sub_ret_code (output)
the subroutine return code.
sub_reason_code (output)
the subroutine reason code; this is 0 for normal subroutine returns.
sub_feedback_code (output)
the feedback code for enclave termination; this is the CEE000 feedback code for normal subroutine returns. A return code is provided in register 15 and can contain the following values:
0
The environment was activated and the routine called.
4
The function_code is not valid.
8
CEEPIPI was called from a Language Environment-conforming HLL.
12
The indicated environment was not initialized to allow multiple Language Environment environments for subroutines.
16
The token is invalid.
28
A PL/I STOP, C exit(), or unhandled condition with severity 2 or greater occurred.
36
The language of the subroutine is not present in the environment identified by token.
Usage Notes:
  1. This CWI is supported in the init_sub_dp environment only.
  2. The init_sub_dp environment must be initialized with TRAP(NOSPIE), INTERRUPT(OFF), and NOTEST.
  3. The routine must be written in PL/I, C, C++, and must be reentrant or written in Language Environment-conforming assembler.
  4. The routine must not contain PL/I STOP or C exit() calls. PL/I STOP and C exit() will cause a Language Environment enclave termination. Such termination will cause an unpredictable result because the TCB for the CALL time is different from the TCB for the INIT/TERM time.
  5. If the PL/I or C routine calls an Assembler routine, the Assembler routine must not contain an SVC LINK; LINK will cause a Language Environment enclave initialization. Such initialization will cause unpredictable results because the TCB for the CALL time is different from the TCB for the INIT/TERM time.
  6. The caller of this CWI is responsible to establish its own error recovery for hardware- and software-detected errors; otherwise, the Language Environment condition manager will be in control. The Language Environment condition manager will terminate the current Language Environment enclave and/or process for any unhandled condition with severity 2 or greater. Such termination will cause unpredictable results because the TCB for the CALL time is different from the TCB for the INIT/TERM time.
  7. If the CEEPIPI(init_sub_dp,...) interface is used to establish multiple Language Environment environments under the same address space, the routine must not use z/OS UNIX functions.
  8. The Language Environment Math services can be called when using the call_sub_addr_nochk function.
  9. Nested enclaves are not supported when call_sub_addr_nochk is used while in System Request Block (SRB) mode.
  10. The language of the routine must already be present in Language Environment, identified by token. This is done by including a routine coded in the same language in the PreInit table used during initialization of the environment.