SQL/MP Programming Manual for COBOL85
Dynamic SQL Operations
HP NonStop SQL/MP Programming Manual for COBOL85—429326-004
10-11
Defining Storage for Input and Output Parameters
more than one SQLDA; in some cases, you can reuse the same structure for different
SQL statements.
If there are input parameters in the dynamic SQL statement, you must have an input
SQLDA to describe them. Similarly, if your program handles dynamic SELECT
operations, declare an SQLDA to describe the output results (SELECT columns).
If your application prompts the user for parameter values or displays column names for
output to the user, declare one or more names buffers.
SQLDA Contents
Table 10-2 describes the information stored in the SQLDA structure. Note that the
SQLDA structure contains an SQLVAR record for each input parameter or output
variable.
Table 10-2. SQLDA Structure Fields (page 1 of 3)
Field Name Description
EYE-CATCHER An identifying field that a program must initialize. SQL/MP does not
return a value to EYE-CATCHER.
NUM-ENTRIES The number of input or output parameters the SQLDA structure can
accommodate.
SQLVAR Group item that describes input parameters or database columns. The
DESCRIBE INPUT and DESCRIBE statements return one SQLVAR entry
for each input parameter or each output variable.
DATA-TYPE The data type of the parameter. For the values used for each data type,
see Table 10-3
on page 10-13.