Date definitions
- NY2C
- New file, date in character format
- NY2Z
- New file, date in zoned decimal format
- NY2D
- New file, date in unsigned packed decimal format
- NY2P
- New file, date in packed decimal format
- OY2C
- Old file, date in character format
- OY2Z
- Old file, date in zoned decimal format
- OY2D
- Old file, date in unsigned packed decimal format
- OY2P
- Old file, date in packed decimal format
- If any Date Definition process statements are used, also use a
Y2PAST process statement, so that the
century
portion of the date can be determined where necessary. (If a Y2PAST process statement is not present, a default fixed window based on the current year is used.) - For a description of each date format (character, zone, decimal, and packed), see Date formats (keyword suffixes: C, Z, D, P).
- If any Date Definition process statements are used, an information line is generated on the listing output (see Figure 1).
- Do not use any Date Definition process statements if using the COLHEAD process statement.
Defines the location and format of a date field on the input file. Up to 254 date definition statements can be entered for each file. The matching of the new to the old dates is performed according to the sequence that the statements are entered. That is, the first defined old date is matched to the first defined new date.
If the number of date definition statements for one file differ
from the number of date definition statements for the other file,
the location and format details for the missing
date definition
statements are assumed to be the same as their counterpart date definition
statements for the other file.
- start_column
- The first position of the date in the input file.
- last_start_column
- The last position of the date in the input file. (Must be separated from the start_column by a colon.)
- date_format
- A mask representing the format of the date.
For a Julian date, the mask must be either YYDDD or YYYYDDD.
For date formats other than Julian, the mask must contain 2
D
s (representing the day part of the date field), 2M
s (representing the month), and either 2 or 4Y
s (representing the year) or, if the date contains a year only, it must contain either 2 or 4Y
s.If the date is character, there may also be a separator between the different parts. In this case, you can represent the position of the separators by one of the following:S
(indicates that this position within the date is not used in comparison).
(period, used in comparison)/
(forward slash, used in comparison):
(colon, used in comparison)
Note: The length of the date_format mask must correspond to the length of the date in the input file as indicated by the values of start_column and last_start_column. - EMPTY
- This keyword is optional. If it is entered, the defined date field
is checked for containing zeros, spaces, low-values, or high-values
before commencing the comparison process. If any of these values are
found, the date is not converted according to the Y2PAST criteria
but instead is converted to an extended format with the initial value.
For example, a date defined by the process statement
OY2C YYMMDD
which contains all zeros is compared asYYYYMMDD
with a value of zeros.
Example | Description |
---|---|
|
The new file has dates in character format in columns 1 to 8, 9 to 16 and 21 to 28. |
|
The old file has dates in packed decimal format in columns 5 to 8 and 9 to 12. |
|
The old file has a date in packed decimal format in columns 101 to 104, |
|
The new file has a date in zoned decimal format in columns 101 to 108. |
|
The new file has a date in character format (with separators) in columns 101 to 110. |
|
The old file has a date in character format in columns 93 to 98. If the date field contains zeros, spaces, low-values, or high-values, the date in the old file is converted before being compared to an extended format (DDMMYYYY) with a value of all zeros, spaces, low-values, or high-values. |