8. SQL Statements : DESCRIBE INPUT : Syntax
 
Share this page                  
Syntax
The DESCRIBE INPUT statement has the following format:
EXEC SQL DESCRIBE INPUT statement_name
USING [SQL] DESCRIPTOR :descriptor_name
[WITHOUT NESTING]
statement_name
Specifies a valid prepared statement. Specify the statement_name using a string literal or a host language string variable. If the statement is prepared but has no input parameters, the DESCRIBE INPUT succeeds and returns zero for the returned SQLDA's sqld field.
descriptor-name
Identifies the name of the receiving descriptor area, formatted as an SQLDA. The descriptor name can be SQLDA or any other valid object name defined by the program when the structure is allocated. Because the SQLDA is not declared in a declaration section, the preprocessor does not verify that descriptor_name represents an SQLDA structure. If descriptor_name does not represent an SQLDA structure, undefined errors occur at runtime. For information about the structure of an SQLDA and its allocation and inclusion in an embedded program, see the Embedded SQL Companion Guide.
WITHOUT NESTING
This optional noise phrase is included for Standards conformance. It has no effect on the operation of the statement.
The DESCRIBE INPUT statement cannot be issued until after the program allocates the SQLDA and sets the value of the SQLDA's sqln field to the number of elements in the SQLDA's sqlvar array. The results of the DESCRIBE INPUT statement are complete and valid only if the number of the statement parameter markers is less than or equal to the number of allocated sqlvar elements.