      SUBROUTINE PRRULE(J,OUNIT,RNM,TOL,KETA,ETAMAX,REPS)
C
C
C     .. Parameters ..
      INTEGER           MAXSTP
      PARAMETER         (MAXSTP=301)
C     .. Scalar Arguments ..
      REAL  ETAMAX, REPS, RNM, TOL
      INTEGER           J, KETA, OUNIT
C     .. Local Scalars ..
      INTEGER           I, K
      CHARACTER*5       PRO
      CHARACTER*10      DIGIT
      CHARACTER*(MAXSTP) RULE
C     .. Intrinsic Functions ..
      INTRINSIC         MOD
C     .. Data statements ..
      DATA              DIGIT/'0123456789'/
C     .. Executable Statements ..
C
      go to 7777
      IF (J.LE.0) RETURN
      IF (ETAMAX.GT.REPS .AND. RNM.GT.TOL) THEN
         PRO = '(PRO)'
      ELSE
         PRO = '     '
      END IF
      IF (RNM.LE.TOL) THEN
         WRITE (RULE(1:71),FMT=99999) J, PRO, KETA, ETAMAX, RNM, TOL
      ELSE
         WRITE (RULE(1:71),FMT=99999) J, PRO, KETA, ETAMAX, RNM
      END IF
      WRITE (OUNIT,FMT='(1X,A)') RULE(1:71)
      DO 20 I = 1, J
         IF (MOD(I,5).EQ.0) THEN
            IF (MOD(I,10).EQ.0) THEN
               K = MOD(I/10,10) + 1
               RULE(I:I) = DIGIT(K:K)
            ELSE
               RULE(I:I) = '+'
            END IF
         ELSE
            RULE(I:I) = '.'
         END IF
   20 CONTINUE
      IF (J.LE.80) THEN
         WRITE (OUNIT,FMT='(1X,A)') RULE(1:J)
      ELSE IF (J.GT.80 .AND. J.LE.160) THEN
         WRITE (OUNIT,FMT='(1X,A)') RULE(1:80)
         WRITE (OUNIT,FMT='(1X,A)') RULE(81:J)
      ELSE IF (J.GT.160 .AND. J.LE.240) THEN
         WRITE (OUNIT,FMT='(1X,A)') RULE(1:80)
         WRITE (OUNIT,FMT='(1X,A)') RULE(81:160)
         WRITE (OUNIT,FMT='(1X,A)') RULE(161:J)
      ELSE
         WRITE (OUNIT,FMT='(1X,A)') RULE(1:80)
         WRITE (OUNIT,FMT='(1X,A)') RULE(81:160)
         WRITE (OUNIT,FMT='(1X,A)') RULE(161:240)
         WRITE (OUNIT,FMT='(1X,A)') RULE(241:J)
      END IF
 7777 continue
      RETURN
C
99999 FORMAT (' J =',I3,1X,A5,1P,' |ETA(',I3,')| =',D11.3,' RNM =',
     *       D11.3,:' TOL =',D11.3)
      END
