Field descriptions of an occurrence of a base SQLIMSVAR

The fields of a base SQLIMSVAR have different uses depending on the SQL statement.

The following table describes the contents of the fields of a base SQLIMSVAR.

Table 1. Fields in an occurrence of a base SQLIMSVAR
COBOL name  Data type Usage in DESCRIBE Usage in FETCH

sqlimstype
SQLIMSTYPE

SMALLINT Indicates the data type of the column and whether it can contain null values. For a description of the type codes, see Table 1. Indicates the data type of the host variable and whether an indicator variable is provided. For a description of the type codes, see SQLIMSTYPE and SQLIMSLEN.

sqlimslen
SQLIMSLEN

SMALLINT The length attribute of the column. See SQLIMSTYPE and SQLIMSLEN for a description of allowable values. The length attribute of the host variable. See SQLIMSTYPE and SQLIMSLEN for a description of allowable values.

sqlimsdata
SQLIMSDATA

pointer Reserved. Contains the address of the host variable.

sqlimsind
SQLIMSIND

pointer Reserved Contains the address of an associated indicator variable, if SQLIMSTYPE is odd. Otherwise, the field is not used.

sqlimsname
SQLIMSNAME

VARCHAR(30) Contains the unqualified name or label of the column, or a string of length zero if the name or label does not exist. If the name is longer than 30 bytes, it is truncated at a byte boundary. Contains the unqualified name or label of the column, or a string of length zero if the name or label does not exist. If the name is longer than 30 bytes, it is truncated at a byte boundary.