       IDENTIFICATION DIVISION.
       PROGRAM-ID.  PRNTST.
      *            (PRINTER CONFIGURATION TEST)
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.  RMCOBOL.
       OBJECT-COMPUTER.  RMCOBOL.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT PFILE ASSIGN TO PRINT, "PRINTER1".
      *
       DATA DIVISION.
       FILE SECTION.
       FD  PFILE RECORD CONTAINS 132 CHARACTERS,
                 LABEL RECORDS OMITTED.
       01  FD-RECORD PIC X(132).
      *
       WORKING-STORAGE SECTION.
       01  WS-NEW-PAGE           PIC X(132) VALUE "NEW PAGE".
       01  WS-NEXT-LINE                          PIC X(132) VALUE
               "          NEXT LINE".
       01  WS-FIVE-LINES                         PIC X(132) VALUE
               "                    5 LINES".
       01  WS-SAME-LINE                          PIC X(132) VALUE
               "                              SAME LINE".
       01  WS-NEW-PAGE-B                         PIC X(132) VALUE
               "                                      NEW PAGE NEXT".
       01  WS-NEXT-LINE-B                        PIC X(132) VALUE
               "          LINE NEXT".
       01  WS-FIVE-LINES-B                       PIC X(132) VALUE
               "                    5 NEXT".
       01  RETURN-KEY                            PIC X.
      /
       PROCEDURE DIVISION.
       PARA-1.
           OPEN OUTPUT PFILE.
           DISPLAY "THIS SECTION TESTS PRINTER CONFIGURATION."
               LINE 10 POSITION 20 ERASE.
           DISPLAY "MAKE SURE THAT THE PRINTER IS ATTACHED AND"
               LINE 12 POSITION 19.
           DISPLAY "ON LINE." LINE 13 POSITION 37.
           DISPLAY "HIT ANY KEY WHEN READY" LINE 15 POSITION 30.
           ACCEPT RETURN-KEY POSITION 0.
       PARA-2.
           WRITE FD-RECORD FROM WS-NEW-PAGE
               AFTER ADVANCING PAGE.
           WRITE FD-RECORD FROM WS-SAME-LINE
               AFTER ADVANCING ZERO LINES.
           WRITE FD-RECORD FROM WS-FIVE-LINES
               AFTER ADVANCING 5 LINES.
           WRITE FD-RECORD FROM WS-SAME-LINE AFTER ADVANCING 0 LINES.
           WRITE FD-RECORD FROM WS-NEXT-LINE.
           WRITE FD-RECORD FROM WS-NEXT-LINE.
           WRITE FD-RECORD FROM WS-NEW-PAGE-B
               BEFORE ADVANCING PAGE.
           WRITE FD-RECORD FROM WS-SAME-LINE AFTER ADVANCING 0 LINES.
           WRITE FD-RECORD FROM WS-FIVE-LINES-B
               BEFORE ADVANCING 5 LINES.
           WRITE FD-RECORD FROM WS-SAME-LINE AFTER ADVANCING 0 LINES.
           WRITE FD-RECORD FROM WS-NEXT-LINE-B
               BEFORE ADVANCING 1 LINE.
           WRITE FD-RECORD FROM WS-NEXT-LINE-B
               BEFORE ADVANCING 1 LINE.
       PROGRAM-END.
           CLOSE PFILE.
       EXIT-PARA.
           EXIT PROGRAM.
       END PROGRAM.
