ECN-4590 ACCEPT ... FROM MICROSECOND-TIME enhancement

Product: ACUCOBOL-GT

Module: compiler, runtime

Machines Affected: all

Known Versions Affected: N/A

DESCRIPTION:

This enhancement adds support for microsecond resolution time values when supported by the underlying system.

There are two ways to access this support:

  • ACCEPT ... FROM MICROSECOND-TIME. MICROSECOND-TIME is a new keyword available in this version. The associated data item should be a PIC 9(12) or larger. The format of the data is similar to the previous ACCEPT ... FROM TIME support, except that there are now six decimal places for fractional second values: HHMMSSUUUUUU (Hours, Minutes, Seconds, Microseconds).
  • ACCEPT ... FROM TIME into a PIC 9(12) data item, or larger. The compiler will generate code to provide microsecond values in this case. For data items with less than 12 digits, the previous 8 digit time will be provided.

    This is a change of behavior if you were previously accepting TIME into a larger than PIC 9(8) data item. In this case, the previous behavior may be obtained by compiling with an earlier compatibility version such as that for version 10.2 (using the -c102 compiler option).

Note: The precision and accuracy of the time values provided depend on the operating system. As of the current date, UNIX and Linux systems will generally provide microsecond precision values while Windows systems will provide millisecond precision values with the trailing three digits being zero.