Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


WHEN-COMPILED

The WHEN-COMPILED special register contains the date at the start of the compilation. WHEN-COMPILED is an alphanumeric data item that has the implicit definition:

01  WHEN-COMPILED GLOBAL PICTURE X(16) USAGE DISPLAY.

When used in nested programs, this special register is implicitly defined with the global attribute in the outermost program.

The WHEN-COMPILED special register has the format:

MM/DD/YYhh.mm.ss (MONTH/DAY/YEARhour.minute.second)

For example, if compilation began at 2:04 PM on 27 April 2006, WHEN-COMPILED would contain the value 04/27/0614.04.00.

WHEN-COMPILED can be used only as the sending field in a MOVE statement.

WHEN-COMPILED special register data cannot be reference-modified.

The compilation date and time can also be accessed with the intrinsic function WHEN-COMPILED (see WHEN-COMPILED). That function supports four-digit year values and provides additional information.


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)