Parameter list for row format descriptions
Db2 passes a description of the row format to an edit routine or a validation routine through a parameter list, which is generated by macro DSNDROW. The description includes both the general row characteristics and the characteristics of each column.
DSNDROW defines the columns in the order as they
are defined in the CREATE TABLE statement or possibly the ALTER TABLE
statement. For rows in the reordered row format, the new column order
in DSNDROW does not necessarily correspond to the order in which the
columns are stored in the row. The following is the general row description:
Name | Hex offset | Data type | Description |
---|---|---|---|
RFMTNFLD | 0 | Signed fullword integer | Number of columns in a row |
RFMTAFLD | 4 | Address | Address of a list of column descriptions |
RFMTTYPE | 8 | Character, 1 byte | Row type:
|
9 | Character, 3 bytes | Reserved |
The following is the description of each column:
Name | Hex offset | Data type | Description |
---|---|---|---|
FFMTFLEN | 0 | Signed fullword integer | Column length attribute |
FFMTFTYP | 4 | Character, 1 byte | Data type code |
FFMTNULL | 5 | Character, 1 byte | Data attribute:
|
FFMTFNAM | 6 | Character, 18 bytes | Column name |
The following is a description of data type codes and
length attributes.
Data type | Code (FFMTFTYP) | Length attribute (FFMTFLEN) |
---|---|---|
BIGINT | X'32' | 8 |
BINARY | X'34' | Length of string |
VARBIN | X'38' | Length of string |
DECFLOAT | X'40' | 8 for DECFLOAT(16) or 16 for DECFLOAT(34) |
INTEGER | X'00' | 4 |
SMALLINT | X'04' | 2 |
FLOAT (single precision) | X'08' | 4 |
FLOAT (double precision) | X'08' | 8 |
DECIMAL | X'0C' | INTEGER(p/2), where p is the precision |
CHAR | X'10' | The length of the string |
VARCHAR | X'14' | The length of the string |
DATE | X'20' | 4 |
TIME | X'24' | 3 |
TIMESTAMP | X'28' | 7 + INTEGER( (p+1) / 2), where p is the precision of the TIMESTAMP. The length can be 7 to 13. |
ROWID | X'2C' | 17 |
INDICATOR COLUMN | X'30' | 4 for a LOB indicator column or 6 for an XML indicator column |