Previous Topic: Transferring ControlNext Topic: Selecting Records for Processing


Coding a Second Heading

 USER 'XYZ COMPANY, INC.'
 PERSONEL:  INPUT DATACOM  RECORD EQ 375  NAME EQ PMF DBID EQ 001
 DEFINE PERSONEL-COMMAND      001-005   X
 DEFINE PERSONEL-KEY          006-010   X
 DEFINE PERSONEL-ELMLIST      191-201   X
 DEFINE PERSONEL-NUMBER       301-305   X '  ID  ' 'NUMBER'
 DEFINE PERSONEL-NAME         306-329   X 'EMPLOYEE NAME'
 DEFINE PERSONEL-CITY         354-368   X 'CITY'
 DEFINE PERSONEL-STATE        369-370   X
 DEFINE PERSONEL-ZIP-CODE     371-375   X 'ZIP'   'CODE'
 MOVE 'GETIT' TO PERSONEL-COMMAND
 MOVE 'EMPNO' TO PERSONEL-KEY
 MOVE 'ADEMP' TO PERSONEL-ELMLIST
 GET PERSONEL
 GOTO EOJ WHEN PERSONEL EQ 'E'
 REPORT 'EMPLOYEE SUMMARY - TEXAS'
 SELECT PERSONEL-STATE EQ 'TX'
 CONTROL PERSONEL-CITY
 PRINT PERSONEL-NAME PERSONEL-NUMBER PERSONEL-CITY
      PERSONEL-ZIP-CODE
 END

The REPORT command specifies the second heading line that can be used to uniquely identify a report.

Code the general REPORT command in the following format:

►►─ REPORT ─ 'heading literal' ───────────────────────────────────────────────►◄

The REPORT command for the sample program looks like this:

 REPORT 'EMPLOYEE SUMMARY - TEXAS'

The word REPORT is coded as shown, followed by the title of the desired second heading. The second line of heading is centered on the line directly below the heading line specified by the USER command. The heading literal must be enclosed within apostrophes.

This REPORT command tells the Reporting Facility that the second heading line on each page of the report will be EMPLOYEE SUMMARY - TEXAS.