Fields in an occurrence of a base SQLVAR

 

Table 97. Field Descriptions for an SQLVAR
C Name 108
COBOL Name
PL/I Name
RPG Name
Field
Data Type
Usage in DESCRIBE and PREPARE (set by the database manager) Usage in FETCH, OPEN, CALL, and EXECUTE (set by the user prior to executing the statement)
sqltype
SQLTYPE
SMALLINT Indicates the data type of the column and whether it can contain nulls. For a description of the type codes, see Table 99.

For a distinct type, the data type on which the distinct type is based is placed in this field. The base SQLVAR contains no indication that this is part of the description of a distinct type.

Indicates the data type of the host variable and whether an indicator variable is provided. For a description of the type codes, see Table 99.
sqllen
SQLLEN
SMALLINT The length attribute of the column. For datetime columns, the length of the string representation of the values. See Table 99.

For a LOB, the value is 0 regardless of the length attribute of the LOB. Field SQLLONGLEN in the extended SQLVAR entry contains the length attribute of the LOB.

The length attribute of the host variable. See Table 99.

For a LOB, the value is 0 regardless of the length attribute of the LOB. Field SQLLONGLEN in the extended SQLVAR entry contains the length attribute of the LOB.

sqlres
SQLRES
CHAR(12) Reserved. Provides boundary alignment for SQLDATA. Reserved. Provides boundary alignment for SQLDATA.
sqldata
SQLDATA
pointer The CCSID of a string column as described in Table 100. Contains the address of the host variable.

For LOB host variables, if the SQLDATALEN field in the extended SQLVAR is null, this points to the four-byte LOB length, followed immediately by the LOB data.

If the SQLDATALEN field in the extended SQLVAR is not null, this points to the LOB data and the SQLDATALEN field points to the four-byte LOB length.

sqlind
SQLIND
pointer Reserved Contains the address of the indicator variable. Not used if there is no indicator variable (as indicated by an even value of SQLTYPE).
sqlname
SQLNAME
VARCHAR(30) The unqualified name of the column. If the column does not have a name, a string is constructed from the expression and returned.

The name is case sensitive and does not contain surrounding delimiters.

Contains the CCSID of the host variable as described in Table 100.

108.
In this column, the lowercase name is the C Name. The uppercase name is the PL/I, COBOL, and RPG Name.