TIME-OF-DAY

IBM DOS/VS COBOL has a TIME-OF-DAY register that contains the current time of day in HHMMSS format, where HH is the hour (on a 24-hour clock), MM is the minute, and SS is the second. Leading zeros are used where necessary to ensure two-digit values. For example, 8 AM would be 080000.

This register is valid only as the source of a MOVE statement without conversion.

When ACUCOBOL-GT is in the IBM DOS/VS COBOL compatibility mode, TIME-OF-DAY may be used as the source of a Format 1 MOVE statement:

     MOVE TIME-OF-DAY TO {dest-item} ...

If there are two or more destination items in the same MOVE statement, all are guaranteed to receive the same value, even if the clock ticks while the statement is being processed.

As usual, the value is truncated or padded with blanks at the right end to make it fit into the destination.