Date formats (keyword suffixes: C, Z, D, P)
- C
- Character date data. Examples:
- '96' is represented as hexadecimal X'F9F6'
- If using a MMDDYY format, March 21, 1996 is represented as hexadecimal X'F0F3F2F1F9F6'
- Z
- Zoned decimal date data. The date can be represented as follows:
X'xyxy' to X'xyxyxyxyxyxyxyxy'
y is hexadecimal 0 to 9 and represents a date digit. x is hexadecimal 0 to F and is ignored.
Examples:- '96' is represented as hexadecimal X'F9C6' or X'0906'
- '03211996' is represented as hexadecimal X'F0F3F2F1F1F9F9C6' or X'0003020101090906'
- P
- Packed decimal date data. The date can be represented as follows:
X'zyyx' to X'zyyyyyyyyx'
y is hexadecimal 0 to 9 and represents a date digit. x is hexadecimal A to F and is ignored. The z part is normally zero but is not ignored.
Examples:- '96' is represented as hexadecimal X'z96F' or X'z96C'
- '1996' is represented as hexadecimal X'z1996C'
- '03211996' is represented as hexadecimal X'z03211996x' (the x part is ignored).
- '96203' (a Julian date) is represented as hexadecimal X'96203C'
- D
- Unsigned packed decimal date data. The date can be represented
as follows:
'yy' to 'yyyyyyyy'
y is hexadecimal 0 to 9 and represents a date digit.
Examples:- '96' is represented as hexadecimal X'96'
- '03211996' is represented as hexadecimal X'03211996'