ANS85 

The WHEN-COMPILED Function

General Format


*

Returned Values

  1. The character positions returned, numbered from left to right, are:
    Character Positions Contents
    1-4 Four numeric digits of the year in the Gregorian calendar.
    5-6 Two numeric digits of the month of the year, in the range 01 through 12.
    7-8 Two numeric digits of the day of the month, in the range 01 through 31.
    9-10 Two numeric digits of the hours past midnight, in the range 00 through 23.
    11-12 Two numeric digits of the minutes past the hour, in the range 00 through 59.
    13-14 Two numeric digits of the seconds past the minute, in the range 00 through 59.
    15-16 Two numeric digits of the hundredths of a second past the second, in the range 00 through 99.

    If the system does not have the facility to provide fractional parts of a second, the value 00 is returned.

    17 Either the character "-", the character " +", or the character "0". The character "-" is returned if the local time indicated in the previous character positions is behind Greenwich Mean Time. The character "+" is returned if the local time indicated is the same or ahead of Greenwich Mean Time. The character "0" is returned if the system on which this function is evaluated does not have the facility to provide the local time differential factor.

    If the system does not have the facility to provide the local time differential factor, the value 00000 is returned in character positions 17 through 21.

    18-19 If character position 17 is "-", two numeric digits are returned in the range 00 through 12, indicating the number of hours that the reported time is behind Greenwich Mean Time. If character position 17 is "+", two numeric digits are returned in the range 00 through 13 indicating the number of hours that the reported time is ahead of Greenwich Mean Time. If character position 17 is "0", the value 00 is returned.
    20-21 Two numeric digits are returned in the range 00 through 59 indicating the number of additional minutes that the reported time is ahead of or behind Greenwich Mean Time, depending on whether character position 17 is "+" or "-" , respectively.

    If character position 17 is "0", the value 00 is returned.

  2. The returned value is the date and time of compilation of the source program that contains this function. If the program is a contained program, the returned value is the compilation date and time associated with the separately compiled program in which it is contained.
  3. The returned value denotes the same time as the compilation date and time if provided in the listing of the source program and in the generated object code for the source program, although their representations and precisions may differ.