Column record (C)

A column record describes the data characteristics of the column. There is a column record for each column in the table. The format of the column record follows:


Byte
Position
Information and Type
01 Column record indicator (C)
02-03 Column name length
04-21 Column name, as obtained from the database or generated by QMF (in the case where the column did not originally have a name). The name is left-justified, and padded with blanks to the right if necessary.
22 Indicator that tells if nulls are allowed; (Y or N)
23 Column selected indicator (Y)
24 Key column indicator (Y)
25 Data class (R)
26-28 Data type (see Table 12 for data type codes)
29-33 Code page (00000)
34-38 Reserved
39-43 Column data length; a numeric value in character form. If data type is DECIMAL, the first 3 bytes represent data precision, and the next 2 bytes represent the scale. If data type is INTEGER, SMALLINT, DATE, TIME, or TIMESTAMP, this field is blank (length is inherent in data type).
44-49 Starting position of column data. A value (in character form) reflecting the offset of the data for a column from the start of the data record. If the column allows nulls, this field points to the null indicator. If the column does not allow nulls, it points to the data itself. Whether or not the column allows nulls, space for the null indicator is always present in the record. The starting position is based from the first byte that contains data. Therefore, the first five bytes of the data (D) record are not included in any consideration of starting position. The first data position is position 1, not position 0.
50-79 Column label information, if available, otherwise blanks
80-81 Two bytes of zeros in character form (00)
[ Previous Page | Next Page | Contents | Index ]