#include <as400_protos.h> int _ILECALLX(const ILEpointer *target, ILEarglist_base *ILEarglist, const arg_type_t *signature, result_type_t result_type, int flags); int _ILECALL(const ILEpointer *target, ILEarglist_base *ILEarglist, const arg_type_t *signature, result_type_t result_type);
Note: These functions can only be used in an i5/OS PASE program. See i5/OS PASE for more information.
The _ILECALLX() and _ILECALL() functions call an ILE procedure from an i5/OS PASE program. They transfer control to an ILE procedure specified by a 16-byte tagged ILE procedure pointer, passing arguments and returning the function result.
The base structure of an ILE argument list (including a function result area) is specified by type ILEarglist_base. Any argument values for the ILE procedure are stored in memory immediately following the ILEarglist_base type. The specific format of the argument list is determined by the list of arg_type_t values addressed by the signature argument. The alignment requirements for each argument value in the ILE argument list depends on its length:
Argument Length | Alignment |
---|---|
1 byte | any |
2 bytes | 2 bytes |
3-4 bytes | 4 bytes |
5-8 bytes | 8 bytes |
9 or more bytes | 16 bytes |
ARG_END (0) | Specifies the end of the signature list. |
ARG_INT8 (-1) | Signed 1-byte integer argument. |
ARG_UINT8 (-2) | Unsigned 1-byte integer argument. |
ARG_INT16 (-3) | Signed 2-byte integer argument. |
ARG_UINT16 (-4) | Unsigned 2-byte integer argument. |
ARG_INT32 (-5) | Signed 4-byte integer argument. |
ARG_UINT32 (-6) | Unsigned 4-byte integer argument. |
ARG_INT64 (-7) | Signed 8-byte integer argument. |
ARG_UINT64 (-8) | Unsigned 8-byte integer argument. |
ARG_FLOAT32 (-9) | 4-byte floating-point argument. |
ARG_FLOAT64 (-10) | 8-byte floating-point argument. |
ARG_MEMPTR (-11) | The argument is a field of type ILEpointer into which the caller has stored an i5/OS PASE memory address (in member address). _ILECALLX and _ILECALL convert the i5/OS PASE memory address to an equivalent teraspace address, except that address zero is converted to a special value for a null pointer. The converted result is passed as the argument value to the target ILE procedure. Both functions may update the ILEpointer value so it contains a tagged space pointer. |
ARG_SPCPTR (-12) | The argument is a field of type ILEpointer where the i5/OS PASE program has stored a tagged space pointer (or an untagged or null pointer). |
ARG_SPCPTRI (-16) | The argument is a field of type ILEpointer into which the caller has stored the i5/OS PASE memory address (in member address) of a tagged space pointer (or an untagged or null pointer) that is passed to the target ILE procedure. The ILEpointer in the argument list may be overlayed with a copy of the space pointer. |
ARG_OPENPTR (-13) | The argument is a field of type ILEpointer where the i5/OS PASE program has stored a 16-byte pointer of any type (including possibly an untagged or null pointer). |
ARG_OPENPTRI (-17) | The argument is a field of type ILEpointer into which the caller has stored the i5/OS PASE memory address (in member address) of a 16-byte pointer of any type (including possibly an untagged or null pointer) that is copied into the argument list (overlaying the original ILEpointer value) and passed as the argument to the target ILE procedure. |
ARG_MEMTS64 (-14) | The argument is a field of type ts64_t into which the caller has stored an i5/OS PASE memory address. _ILECALLX and _ILECALL convert the i5/OS PASE memory address to an equivalent 64-bit teraspace pointer, except that null (address zero) is unchanged. The converted result is passed as the argument value to the target ILE procedure. The ts64_t value in the argument list may be overlayed with the converted address. |
ARG_TS64PTR (-15) | The argument is a field of type ts64_t where the i5/OS PASE program has stored a 64-bit teraspace address. |
Any positive number (1-32767) |
The argument is an aggregate (structure or union). The value in the signature list is the length, in bytes, of the aggregate. |
The following values are supported:
RESULT_VOID(0) | No function result. | |
RESULT_INT8 (-1) | Signed 1-byte integer result, returned in field result.s_int8.r_int8 in the ILEarglist argument. | |
RESULT_UINT8 (-2) | Unsigned 1-byte integer result, returned in field result.s_uint8.r_uint8 in the ILEarglist argument. | |
RESULT_INT16 (-3) | Signed 2-byte integer result, returned in field result.s_int16.r_int16 in the ILEarglist argument. | |
RESULT_UINT16 (-4) | Unsigned 2-byte integer result, returned in field result.s_uint16.r_uint16 in the ILEarglist argument. | |
RESULT_INT32 (-5) | Signed 4-byte integer result, returned in field result.s_int32.r_int32 in the ILEarglist argument. | |
RESULT_UINT32 (-6) | Unsigned 4-byte integer result, returned in field result.s_uint32.r_uint32 in the ILEarglist argument. | |
RESULT_INT64 (-7) | Signed 8-byte integer result, returned in field result.r_int64 in the ILEarglist argument. | |
RESULT_UINT64 (-8) | Unsigned 8-byte integer result, returned in field result.r_uint64 in the ILEarglist argument. | |
RESULT_FLOAT64 (-10) | 8-byte floating-point result, returned in field result.r_float64 in the ILEarglist argument. | |
Any positive number (1-32767) |
The function result is an aggregate (structure or union). result_type is the length, in bytes, of the aggregate. An aggregate function result is returned in a buffer allocated by the caller and passed to the target ILE procedure using a special field in the argument list. The caller must provide a buffer large enough for the result returned by the target ILE procedure to avoid unpredictable results. An i5/OS PASE program must set field result.r_aggregate.addr in type ILEarglist_base to the i5/OS PASE memory address of the result buffer before calling an ILE procedure that returns an aggregate result. _ILECALLX and _ILECALL convert the i5/OS PASE memory address to a teraspace address the same way they convert ARG_MEMPTR arguments. |
ILECALL_NOINTERRUPT (0x00000004) |
Specifies that i5/OS PASE signals will not interrupt the called ILE procedure. Some system functions (such as select) can be interrupted by signals. Normally either an ILE signal or an i5/OS PASE signal can interrupt such an operation, but ILECALL_NOINTERRUPT delays i5/OS PASE signal processing until control returns from the called ILE procedure. This option has no effect on ILE signal handling. |
_ILECALL and _ILECALLX require no authority.
Most errors from _ILECALLX and _ILECALL are reported with i5/OS exception messages that are converted to i5/OS PASE signals. See i5/OS PASE Signal Handling for information about handling i5/OS exceptions.
If no i5/OS PASE signal is sent, one of these values is returned:
ILECALL_NOERROR(0) | The target ILE procedure was called and returned normally. |
ILECALL_INVALID_ARG (1) | An invalid value was found in the signature list. |
ILECALL_INVALID_RESULT (2) | The result_type value is invalid. |
ILECALL_INVALID_FLAGS (3) | The flags value is invalid. |
Top | i5/OS PASE APIs | APIs by category |