Previous Topic: Define Sorts and Control BreaksNext Topic: Modified Source Program


Format Print Lines

Use the PRINT statement to format print lines in a report. A report can contain multiple print lines. Print lines are formatted with explicit or automatic spacing. You can print entire print lines or individual fields conditionally.

In the following example, the print line is rearranged. Since the primary sort is by logonid, the logonid is placed at the top‑most field. The print order of the other fields is also changed.

You can print the calculated field (AMPM) without spacing next to the time by specifying 0 (zero) space between TIMESECONDS and AMPM. The English language REASON field, determined by the DECODE statement in RCTAB, prints at the end of the print line. The print line length, set by OPTION PRINT=, increases to 132 to accommodate the larger printout area.

      PRINT LOGONID
            VTYPE
            DATE
            TIMESECONDS 0
            AMPM
            JOBNAME
            SUBMITTOR
            PROGRAM
            SOURCE
            CPU
            REASON

The previous program modification produces the following changes to this report.

03/29/02                                           LOGON AND PASSWORD VIOLATIONS

                 STARTING DATE: 03‑29‑02    ENDING DATE: 03‑29‑02
                 STARTING TIME: 10.59       ENDING TIME:  3.04 
‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ 
LOGONID  VIO      DATE  TIME       JOBNAME   SUBMITTOR  PROGRAM   SOURCE    CPU 
         TYPE                                LID/PROC 
‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ 
AUEDRL   VIO  03‑29‑02  2.48.36PM                                 H06L83D   CAI1
AUEDRL
AUEJJV   VIO  03‑29‑02 10.59.30AM                                 H06L84F   CAI1
AUEJJV
SSESWB   VIO  03‑29‑02  1.24.58PM  SSESWB    LOGON                V4L3E0    CAI1
SSESWB
SVNSKS   VIO  03‑29‑02  2.02.48PM  SVNSKS    LOGON                V4L3EA    CAI1
SVNSKS
TLCISO   VIO  03‑29‑02 11.09.55AM  STARMAN   STARMAN              USCHGOVB  CAI1 
TLCISO   VIO  03‑29‑02 11.21.50AM  TLCISO    LOGON                V4L3ED    CAI1
TLCISO
TSTRJM   VIO  03‑29‑02  2.20.10PM                                 H06L867   CAI1