Use this key field-level keyword to specify that numeric fields are sequenced as a string of unsigned binary data. Character, date, time, timestamp, and hexadecimal fields default to unsigned values.
This keyword has no parameters.
UNSIGNED is valid on key fields in physical or logical files regardless of the data type of the key field. The UNSIGNED keyword is not allowed with the SIGNED and ABSVAL keywords.
The following figure shows six records with a zoned decimal key field:
Record | Numeric key field (zoned decimal) | Hexadecimal representation |
---|---|---|
1 | 98 | F9F8 |
2 | 00 | F0F0 |
3 | 98- | F9D8 |
4 | 97 | F9F7 |
5 | 20 | F2F0 |
6 | 99 | F9F9 |
If you specify UNSIGNED, the records are sequenced in this order:
Record | Numeric key field (zoned decimal) | Hexadecimal representation |
---|---|---|
2 | 00 | F0F0 |
5 | 20 | F2F0 |
3 | 98- | F9D8 |
4 | 97 | F9F7 |
1 | 98 | F9F8 |
6 | 99 | F9F9 |
The following example shows how to specify the UNSIGNED keyword for a physical file.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R RECORDA 00020A FLDA 7S 2 00030A FLDB 5 00040A K FLDA UNSIGNED A