COBOL Manual for TNS/E Programs (H06.03+)
Intrinsic Functions
HP COBOL Manual for TNS/E Programs—520347-003
14-64
WHEN-COMPILED Function
WHEN-COMPILED Function
WHEN-COMPILED, an alphanumeric function, returns a 21-character string that
represents the date and time the program was compiled, according to the system on
which the program was compiled.
The returned value is the date and time of compilation of the source program that calls
the WHEN-COMPILED function. If the program is a contained program, the returned
value is the date and time of the separately compiled program that contains it.
The returned value represents the current date this way (where character position 1 is
the leftmost character position):
The returned value matches the compilation time and date on the listing and object
code files (if they have it), but the representation and precision may differ.
Character
Positions Date Part Represented Represented by
1-4 Year in Gregorian calendar Four digits
5-6 Month of the year Two digits in the range 01 through 12
7-8 Day of the month Two digits in the range 01 through 31
9-10 Hours past midnight Two digits in the range 00 through 23
11-12 Minutes past the hour Two digits in the range 00 through 59
13-14 Seconds past the minute Two digits in the range 00 through 59
15-16 Hundredths of seconds past the
second
Two digits in the range 00 through 99
17 Relationship to Greenwich mean
time
Minus (-) if the reported time is behind
Greenwich mean time, plus (+) if it is the
same as or ahead of Greenwich mean
time
18-19 Hours behind or ahead of
Greenwich mean time
If character position 17 is minus (-), two
digits in the range 00 through 12; if
character position 17 is plus (+), two
digits in the range 00 through 13
20-21 Additional minutes from
Greenwich mean time
Two digits in the range 00 through 59
WHEN-COMPILEDFUNCTION
VST467.vsd










