Describing a Statement with Runtime Parameters

If the prepared statement contains parameters for which the number of parameters or parameter data types is to be supplied at runtime, you can describe these input values. If the prepared statement text includes one of the following statements, the DESCRIBE statement returns a description of each column or expression that is included in the list:
  • EXECUTE FUNCTION (or EXECUTE PROCEDURE)
  • INSERT
  • SELECT (without an INTO TEMP clause)
  • UPDATE

    In HCL OneDB™, the IFX_UPDDESC environment variable, as described in the HCL OneDB Guide to SQL: Reference, must be set before you can use DESCRIBE to obtain information about an UPDATE statement.

The description includes the following information:
  • The data type of the column, as defined in the table
  • The length of the column, in bytes
  • The name of the column or expression

For a prepared INSERT or UPDATE statement, DESCRIBE returns only the dynamic parameters (those expressed with a question mark (?) symbol). Using the OUTPUT keyword, however, prevents these from being returned.

You can specify a destination for the returned information as a new or existing system-descriptor area, or as a pointer to an sqlda structure.

A system-descriptor area conforms to the X/Open standards.