UNLOAD PLUS pseudo-SQLDA
The pseudo-SQLDA structure describes each table and the columns being unloaded. For pseudo-SQLDA for each language, see the following references:
Language | Reference |
---|---|
Assembler | |
C | |
COBOL |
The pseudo-SQLDA structure consists of two portions: the SQLDA portion and the SQLVAR portion. The SQLDA portion of the pseudo-SQLDA contains the fields of the SQLDA. This portion appears after each Db2 table is unloaded. The Fields of the SQLDA portion of the pseudo-SQLDA table summarizes the field names, data types, and usage notes for each field in the SQLDA portion of the structure.
The SQLVAR portion of the pseudo-SQLDA contains the fields of the SQLVAR. This portion is repeated for each column in the Db2 table being unloaded. The Fields of the SQLVAR portion of the pseudo-SQLDA table summarizes the field names, data types, and usage notes for each field in this portion of the structure.
Within the SQLVAR portion of the pseudo-SQLDA is a field for the SQLTYPE. The value of this field depends on the type of data in the column and whether or not it allows null values. The Valid SQLTYPE field values for pseudo-SQLDA DSECT table describe the valid SQLTYPE field values for each data type supported.
The following table describes the fields of the SQLDA portion of the pseudo-SQLDA:
Value | Data type | Indicator variable |
---|---|---|
384/385 | Date | No/yes |
388/389 | Time | No/yes |
392/393 | Timestamp | No/yes |
448/449 | Variable-length character string | No/yes |
452/453 | Fixed-length character string | No/yes |
456/457 | Long variable-length character string | No/yes |
464/465 | Variable-length graphic string | No/yes |
468/469 | Fixed-length graphic string | No/yes |
472/473 | Long variable-length graphic string | No/yes |
480/481 | Floating-point | No/yes |
484/485 | Decimal | No/yes |
496/497 | Large integer | No/yes |
500/501 | Small integer | No/yes |
The following table describes the fields of the SQLVAR portion of the pseudo-SQLDA:
Field name | Data type | Usage |
---|---|---|
SQLDAID | CHAR(8) | "Eye-catcher" for storage dumps containing 'SQLDAX' |
SQLDABC | INTEGER | Length of the SQLDA, equal to SQLN*44+16 |
SQLN | SMALLINT | Number of occurrences of SQLVAR |
SQLD | SMALLINT | Total number of columns described by occurrences of SQLVAR |
The following table describes the valid SQLTYPE field values for pseudo-SQLDA DSECT:
Field Name | Data Type | Usage |
---|---|---|
SQLTYPE | SMALLINT | For Initialization Function Code 1 and Processing Function Code 0, contains the data type of the column and whether it allows null values |
SQLLEN | SMALLINT | For Initialization Function Code 1 and Processing Function Code 0, defines the external length of a value from the column as follows: Date: Db2 installation defined Time: Db2 installation defined Timestamp: 26 (bytes) Data Type: Content Character: Length attribute in bytes Graphic: Length attribute in double-byte characters Decimal: byte 1 = precision; byte 2 = scale Float: 4 (bytes) for single-precision; 8 for double precision Smallint: 2 (bytes) Integer: 4 (bytes) |
SQLDATA | Pointer | For Processing Function Code 0 only, contains the address of the data field in the record |
SQLIND | Pointer | For Processing Function Code 0 only, contains the address of an associated indicator variable, if there is one; otherwise not used |
SQLNAME | VARCHAR (30) | For Initialization Function Code 1 and Processing Function Code 0, contains the name of the column |
The following figure displays the user exit pointer relationships to SQLDA