The following example shows you how to define date, time, and timestamp fields in DDS.
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....
A LOGICAL FILE LF1 FOR DATE, TIME, AND TIMESTAMP EXAMPLES
00010A
00020A R RECORD1
00030A DATFLD1 L DATFMT(*JUL)
00040A ALIAS(A_DATE_JUL)
00050A DATFLD2 L DATFMT(*EUR)
00060A ALIAS(A_DATE_EUR)
00070A DATFLD3 L DATFMT(*DMY) DATSEP('-')
00080A ALIAS(A_DATE_DMY)
00090A DATFLD4 L DATSEP(' ')
00100A TIMFLD1 T TIMFMT(*ISO)
00110A ALIAS(A_DATE_ISO)
00120A TIMFLD2 T TIMFMT(*USA)
00130A ALIAS(A_DATE_USA)
00140A TIMFLD3 T TIMSEP(' ')
00150A TIMFLD4 T TIMSEP('.')
00160A TSFLD1 Z DFT('1998-02-27-08.15.22.000000')
A
If the current date is June 21, 1990, the current system date format value is MDY, and the system date separator value is '/', DATFLD3 contains 21-06-90. DATFLD4 contains 06 21 90.
If the current date is June 21, 1990, the current system date format value is MDY, and the current system separator is /, DATFLD1 contains 90/172 (the 172nd day of the year 1990). DATFLD2 contains 21.06.1990.
If the current time is 2 o'clock p.m., the system time format is hhmmss, and the system time separator is ':', TIMFLD1 contains 14.00.00. TIMFLD2 contains 2:00 PM.
If the current time is 2 o'clock p.m., the system time format is hhmmss, and the system time separator is ':', TIMFLD3 contains 14 00 00. TIMFLD4 contains 14.00.00.
If you are defining a timestamp field, you must specify the default value in the following format:
DFT('YYYY-MM-DD-HH.MM.SS.UUUUUU')
If the DFT keyword is not specified, the default value is the current time.