Process Immediate SQL Statement (QxdaProcessImmediateEDRS) API


  Required Parameter Group:

1 Connection handle Input Binary(4)
2 SQL statement Input Char(*)
3 Length of SQL statement Input Binary(4)
4 SQL communications area Output Char(136)
5 Error code I/O Char(*)

  Service Program: QXDAEDRS

  Default Public Authority: *USE

  Threadsafe: Conditional; see Usage Notes

The Process Immediate SQL Statement (QxdaProcessImmediateEDRS) API is used to run an SQL statement on the database server. The statement is processed exactly as provided, without coded character set identifier (CCSID) conversion.


Authorities and Locks

None.


Required Parameter Group

Connection handle
INPUT; BINARY(4)

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

SQL statement
INPUT; CHAR(*)

The SQL statement to process.

Length of SQL statement
INPUT; BINARY(4)

The length of the SQL statement passed.

SQL communications area
OUTPUT; CHAR(136)

Returns diagnostic information. It includes the SQLCODE variable, indicating whether an error has occurred. If SQLCODE has a value of 0 after a call to this API, the function was successful.

The format of this structure is standard and is described more completely in the DB2 UDB for iSeries SQL Programming Concepts topic and the DB2 UDB for iSeries SQL Reference topic.

Error code
I/O; CHAR(*)

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


Usage Notes

This function may be called from the initial thread of a job only.


Error Messages

Message ID Error Message Text
CPF180C E Function &1 not allowed.
CPF24B4 E Severe error while addressing parameter list.
CPF3C90 E Literal value cannot be changed.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPFB750 E Connection handle specified not valid.
CPFB752 E Internal error in &1 API.
CPFB756 E Rollback operation performed.
CPFB757 E The connection is suspended.
CPFB758 E The EDRS server system has been switched.



API introduced: V4R4
Top | Database and File APIs | APIs by category