Call Program (QxdaCallProgramEDRS) API


  Required Parameter Group:


  Service Program Name: QXDAEDRS

  Default Public Authority: *USE

  Threadsafe: Conditional; see Usage Notes

The Call Program (QxdaCallProgramEDRS) API is used to call a user-defined program on the database server system. All parameters are passed to the program by reference.


Authorities and Locks

Any program
*USE
Library of the program
*EXECUTE

Required Parameter Group

Connection handle
INPUT; BINARY(4)

The handle number of the connection on which to call the program. The connection handle must have been generated by the QxdaConnectEDRS API in the current job and activation group.

Qualified program name
INPUT; CHAR(20)

The library and name of the program to call. The special value *LIBL may be specified for the library name; however, the library list of the server job may differ from that of the client job.

Number of parameters
INPUT; BINARY(4)

The number of parameters to pass to the program.

Parameter information
INPUT; CHAR(*)

Information about each of the parameters. This should be an array of type Qxda_ParmInfo_t, with one entry for each parameter. For the format of each array element, see Qxda_ParmInfo_t Format.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Qxda_ParmInfo_t Format

The following table shows the structure of the Qxda_ParmInfo_t format. For more details about the fields in this table, see Field Descriptions.



Field Descriptions

Parameter address. The address where an input parameter exists or where an output parameter should be returned.

Parameter length. The number of bytes allocated for the parameter.

Parameter type. The type of the parameter. The possible values are:


Parameter usage. The usage of the parameter. The possible values are:


Reserved. Reserved field; it must be initialized to 0x00.


Usage Notes

This function may be called from the initial thread of a job only. For the IBM i version of this API, the QXDA_CHAR and QXDA_HEX parameter types are equivalent.


Error Messages




API introduced: V4R4

[ Back to top | Database and File APIs | APIs by category ]