SQLIMSTYPE and SQLIMSLEN
The contents of the SQLIMSTYPE and SQLIMSLEN fields of the SQLIMSDA depends on the SQL statement that is returning the value.
The following table shows the values that can appear in the SQLIMSTYPE and SQLIMSLEN fields of the SQLIMSDA. In DESCRIBE, an even value of SQLIMSTYPE means the column does not allow nulls, and an odd value means the column does allow nulls. In FETCH, an even value of SQLIMSTYPE means no indicator variable is provided, and an odd value means that SQLIMSIND contains the address of an indicator variable.
SQLIMSTYPE | For DESCRIBE | For FETCH | ||
---|---|---|---|---|
Column or parameter data type | SQLIMSLEN | Host variable data type | SQLIMSLEN | |
384/385 | date | 10 1 | fixed-length character string representation of a date | length attribute of the host variable |
388/389 | time | 8 2 | fixed-length character string representation of a time | length attribute of the host variable |
392/393 | timestamp | 26 | fixed-length character string representation of a timestamp | length attribute of the host variable |
452/453 | fixed-length character string | length attribute of the column | fixed-length character string | length attribute of the host variable |
480/481 | floating point | 4 for single precision, |
floating point | 4 for single precision, |
484/485 | packed decimal | precision in byte 1; scale in byte 2 | packed decimal | precision in byte 1; scale in byte 2 |
492/493 | big integer4 | 8 | big integer | 8 |
496/497 | large integer | 4 | large integer | 4 |
500/501 | small integer | 2 | small integer | 2 |
504/505 | N/A | N/A | DISPLAY SIGN |
precision in byte 1; scale in byte 2 |
912/913 | fixed-length binary string | length attribute of the column | fixed-length binary string | length attribute of the host variable |
Note:
- SQLIMSLEN might be different if a date installation exit is specified.
- SQLIMSLEN might be different if a time installation exit is specified.
- Field SQLIMSLONGLEN in the extended SQLIMSVAR contains the length attribute of the column.
- BIGINT is supported by other IMS platforms.