Example 13
OPTION COPY,Y2PAST=1996
INREC BUILD=(1,6,Y2W,TOJUL=Y4T,X,
1,6,Y2W,WEEKDAY=CHAR3,X,
9,7,Y4T,TOGREG=Y4T(/),X,
9,7,Y4T,WEEKDAY=DIGIT1)
This example illustrates how to convert an mmddyy date to a ccyyddd date and a 3-character weekday string, and how to convert a ccyyddd date to a ccyy/mm/dd date and 1-digit weekday string.
The input records might be as follows:
120409 1999014
051895 2003235
999999 0000000
013099 1992343
The output records would be as follows:
2009338 FRI 1999/01/14 5
2095138 WED 2003/08/23 7
9999999 999 0000/00/00 0
1999030 SAT 1992/12/08 3
The Y2PAST=1996 option sets the century window to 1996-2095. The century window is used to transform yy in the Y2W field to ccyy.
Note that date conversion is not performed for the special indicators (all 9s and all 0s); the special indicator is just used appropriately for the output date field.