C   07/06/96 606071914  MEMBER NAME  UCOND    (S4)          FORTG1
      SUBROUTINE UCOND(NCOND,NC)
      COMMON/BCS/IW(1)
      INTEGER*2 NH(2)
      EQUIVALENCE (NF,NH(1))
C
C     PURPOSE
C        COUNT NUMBER OF CONDITIONS, CHARACTERIZED BY
C        TWO INTEGERS NCOND,NC  (BOTH LT 32768)
C
C     USAGE
C        CALL UCOND(NCOND,NC)
C      = INCREASE COUNT FOR CONDITION (NCOND,NC) BY 1
C
C        CALL PCOND
C      = PRINT COUNTS AND RESET COUNTERS
C
C        CALL QCOND(NCOND,NC,NUMBER)
C      = GET NUMBER OF COUNTS OF CONDITION (NCOND,NC)
C
      IF(NCOND.LT.0.OR.NCOND.GE.32768) GOTO 100
      IF(NC   .LT.0.OR.NC   .GE.32768) GOTO 100
      NH(1)=NCOND
      NH(2)=NC
      NS=(NF/8)*8
      NR=MOD(NF,8)
C     WRITE(6,101) NS,NR,NF,NH
C 101 FORMAT(1X,10I12)
      CALL BLOC(I,'CON*',NS,&20)
   10 IW(I+NR+1)=IW(I+NR+1)+1
  100 RETURN
   20 CALL BCRE(I,'CON*',NS,8,&100,IER)
      GOTO 10
C
      ENTRY QCOND(NCOND,NC,NUMBER)
      NUMBER=0
      IF(NCOND.LT.0.OR.NCOND.GE.32768) GOTO 100
      IF(NC   .LT.0.OR.NC   .GE.32768) GOTO 100
      NH(1)=NCOND
      NH(2)=NC
      NS=(NF/8)*8
      NR=MOD(NF,8)
      CALL BLOC(I,'CON*',NS,&100)
      NUMBER=IW(I+NR+1)
      GOTO 100
      END
