DIGIT (Digit) keyword for physical and logical files
DIGIT (Digit) keyword for physical and logical files
DIGIT (Digit) keyword for physical and logical files
If this key field-level keyword is in effect, only the digit portion (farthest right 4 bits) of each byte of the key field is used when the system constructs a value associated with this key field. The zone portion is zero-filled.
This keyword has no parameters.
The DIGIT keyword is applied against the entire key field (not just a position within the field). It is valid only for character, hexadecimal, or zoned decimal type fields.
You cannot use this keyword with the ABSVAL, SIGNED, or ZONE keywords.
If you specify DIGIT for a key field, the value of the field is treated as a string of unsigned binary data, rather than signed data, which is the default for zoned decimal fields.
Example
The following example shows how to specify the DIGIT keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00040A K ORDTYP DIGIT
A
If ORDTYP is a 3-byte field, the values of the field for three different records might be as follows:
| Values | Hexadecimal | Digits used for key |
|---|---|---|
| C4J | C3F4D1 | 341 |
| CMA | D3D4C1 | 341 |
| 3D1 | F3C4F1 | 341 |