MAINLINE.
ACCEPT SYSTEM-WEEKDAY FROM DAY-OF-WEEK.
ACCEPT SYSTEM-DATE FROM DATE.
ACCEPT SYSTEM-TIME FROM TIME.
EVALUATE SYSTEM-WEEKDAY
WHEN 1 MOVE 'Mon' TO HEADER-WEEKDAY
WHEN 2 MOVE 'Tue' TO HEADER-WEEKDAY
WHEN 3 MOVE 'Wed' TO HEADER-WEEKDAY
WHEN 4 MOVE 'Thu' TO HEADER-WEEKDAY
WHEN 5 MOVE 'Fri' TO HEADER-WEEKDAY
WHEN 6 MOVE 'Sat' TO HEADER-WEEKDAY
WHEN 7 MOVE 'Sun' TO HEADER-WEEKDAY
END-EVALUATE.
EVALUATE SYSTEM-MONTH
WHEN 1 MOVE 'Jan' TO HEADER-MONTH
WHEN 2 MOVE 'Feb' TO HEADER-MONTH
WHEN 3 MOVE 'Mar' TO HEADER-MONTH
WHEN 4 MOVE 'Apr' TO HEADER-MONTH
WHEN 5 MOVE 'May' TO HEADER-MONTH
WHEN 6 MOVE 'Jun' TO HEADER-MONTH
WHEN 7 MOVE 'Jul' TO HEADER-MONTH
WHEN 8 MOVE 'Aug' TO HEADER-MONTH
WHEN 9 MOVE 'Sep' TO HEADER-MONTH
WHEN 10 MOVE 'Oct' TO HEADER-MONTH
WHEN 11 MOVE 'Nov' TO HEADER-MONTH
WHEN 12 MOVE 'Dec' TO HEADER-MONTH
END-EVALUATE.
MOVE SYSTEM-DAY TO HEADER-DAY.
IF SYSTEM-HOUR IS LESS THAN 12
MOVE 'AM' TO HEADER-AM-PM
ELSE
MOVE 'PM' TO HEADER-AM-PM
IF SYSTEM-HOUR IS NOT LESS THAN 13
SUBTRACT 12 FROM SYSTEM-HOUR
END-IF
END-IF.
MOVE SYSTEM-HOUR TO HEADER-HOUR.
MOVE SYSTEM-MINUTE TO HEADER-MINUTE.
DISPLAY HEADER-LINE.
STOP RUN.