SQL/MP Programming Manual for COBOL

Dynamic SQL Operations
HP NonStop SQL/MP Programming Manual for COBOL529758-003
10-15
Defining Storage for Input and Output Parameters
Declaring the SQLDA Structure, Names Buffer, and Collation
Buffer
To declare an SQLDA structure and associated buffers, use the INCLUDE SQLDA
directive in the Data Division of your program (but not in a Declare Section). The
syntax is:
sqlda-name
is the name of the SQLDA structure. sqlda-name must follow the conventions for
COBOL names.
sqlvar-count
is either the maximum number of parameters (excluding indicator parameters) for
which you expect to receive input values or, for an output SQLDA, the maximum
number of output parameters. The default is 1. The HP COBOL compiler
generates a separate SQLVAR structure within the SQLDA for each parameter.
names-buffer
is the COBOL record name of the names buffer. The INCLUDE SQLDA directive
generates a template. For the names buffer, you must declare your own template.
max-name-length
is the maximum number of bytes you expect in a parameter name to be returned in
a DESCRIBE or DESCRIBE INPUT statement. If you expect indicator parameters,
double the value of max-name-length.
210 Minute to Fraction (INTERVAL)
211 Hour to Fraction (INTERVAL)
212 Day to Fraction (INTERVAL)
INCLUDE SQLDA ( sqlda-name [, sqlvar-count ]
[, names-buffer, max-name-length ]
[, release-option ]
[, CPRULES collation-buffer, max-collation-size ]
)
Table 10-3. SQLDA DATA-TYPE Values (page 3 of 3)
Value Type of Data