Skip to main content

Problem:

If you want to store the date in the DATE-COMPILED paragraph of COBOL source then specify the DATE directive when compiling.

Resolution:

Specifying the "DATE" compiler directive will put the date in the DATE-COMPILED paragraph and at the top of each page of the listing.  The sytax is as follows:

   DATE "string"

   DATE                            (with no string)

   NODATE

The "string" is an alphanumeric literal

The date and time, available from the operating system, are automatically inserted when you specify DATE. You can, however, enter the date yourself as the parameter. With NODATE, the paragraph is left unaltered.

With DATE, the operating system date or the string you enter appears at the top of each page of the listing. With NODATE, spaces are used instead.

Old KB# 2004