Value descriptor for field procedures
A value descriptor describes the data type and other attributes of a value.
- During field-definition, they describe each constant in the field procedure parameter value list (FPPVL). The set of these value descriptors is part of the FPPVL control block.
- During field-encoding and field-decoding, the decoded (column) value and the encoded (field) value are described by the column value descriptor (CVD) and the field value descriptor (FVD).
The column value descriptor (CVD) contains a description of a column value and, if appropriate, the value itself. During field-encoding, the CVD describes the value to be encoded. During field-decoding, it describes the decoded value to be supplied by the field procedure. During field-definition, it describes the column as defined in the CREATE TABLE or ALTER TABLE statement.
The field value descriptor (FVD) contains a description of a field value and, if appropriate, the value itself. During field-encoding, the FVD describes the encoded value to be supplied by the field procedure. During field-decoding, it describes the value to be decoded. Field-definition must put into the FVD a description of the encoded value.
Value descriptors have the following formats:
Name | Hex offset | Data type | Description |
---|---|---|---|
FPVDTYPE | 0 | Signed 2-byte integer | Data type of the value:
|
FPVDVLEN | 2 | Signed 2-byte integer |
|
FPVDVALE | 4 | None | The value. The value is in external format, not Db2 internal format. If the value is a varying-length string, the first halfword is the value's actual length in bytes. This field is not present in a CVD, or in an FVD used as input to the field-definition operation. An empty varying-length string has a length of zero with no data following. |