Printing the Date

In the HEADING section, the reserved variable $current-date prints the date and the time. This variable is initialized with the date and time of the client machine when the program starts to run. SQR provides predefined, or reserved, variables for a variety of uses.

In this example, the complete command is PRINT $current-date (1,1) EDIT 'DD/Mon/YYYY'. It prints the date and time at position 1,1 of the heading. The EDIT argument specifies an edit mask, or format, for printing the date. SQR provides a variety of edit masks for use in formatting numbers, dates, and strings.

See SQR Language Reference for PeopleSoft: PRINT.

Note that the PRINT command for the report title precedes the command for the $current-date reserved variable, even though the date is on the left and the title is on the right. SQR always assembles a page in memory before printing, so the order of these commands does not matter if you use the correct print position qualifiers.

The last two commands in the HEADING section print a string of hyphens under the column headings. Note the use of the FILL option with the PRINT command. This option tells SQR to fill the specified width with this pattern, which is a useful method to print a line.

The FOOTING section prints Page n of m as in earlier examples.