C
C SUBROUTINE 'QGPSET'
C ===================
C
C CONTROLS OUTPUT TO TEMPORARY POSTSCRIPT FILE (IF POSTSCRIPT DUPLICATION
C OPTION IS BEING USED
C
      SUBROUTINE QGPSET (IOPT)
C
C PARAMETERS
C
C      IOPT (I)   FLAG =0 TURN OFF POSTCRIPT RECORDING
C                      =1 TURN ON POSTSCRIPT RECORDING
C                      =2 CLEAR CURRENT POSTSCRIPT RECORD AND TURN ON
C                         POSTCRIPT RECORDING (E.G. START A NEW PICTURE)
C
C SPECIFICATION STATEMENTS
C ------------------------
C
      LOGICAL PSCRIP, PSON
      COMMON /QQPS/ PSCRIP, PSON, LUNP
      SAVE /QQPS/
C
C CODE
C ----
C
      IF (.NOT.PSCRIP) RETURN
      IF (IOPT.EQ.0) THEN
         PSON = .FALSE.
         RETURN
      ELSE IF (IOPT.EQ.1) THEN
         PSON = .TRUE.
         RETURN
      ELSE IF (IOPT.EQ.2) THEN
         PSON = .TRUE.
         REWIND LUNP
         ENDFILE LUNP
         REWIND LUNP
      ENDIF
      RETURN
      END
