DESCRIBE INPUT Example

Restriction: This topic applies to Windows environments only.

Execute a DESCRIBE INPUT statement with an SQLDA that has enough SQLVAR occurrences to describe any number of input parameters a prepared statement might have. Assume that five parameter markers at most will need to be described and that the input data does not contain LOBs.

/* STMT1_STR contains INSERT statement with VALUES clause */

EXEC SQL PREPARE STMT1_NAME FROM :STMT1_STR;

/* code to set SQLN to 5 and to allocate the SQLDA */

EXEC SQL DESCRIBE INPUT STMT1_NAME INTO :SQLDA;