
      SUBROUTINE DATA(B,N,NMAX,YMIN,YMAX,IE,IEND,ISKIP,IYMIN)
C                                                           **********
C                                                           ** DATA **
C                                                           **********
C DATA IS A SUBROUTINE OF DIFPLOT WHICH READS THE DATA
C *****************************************************
C    READS UNFORMATTED DATA
C    IF IEND=9 END OF FILE
C *****************************************************
      DIMENSION B(4096),A(32)
      N=0
      IE=IE+2
      YMIN=9999.
      IYMIN=1
      YMAX=-999.
      I1=1
   10 READ(3,END=95) A
      DO 20 I=I1,32,ISKIP
      IF(A(I).LT.0) GO TO 95
      N=N+1
      T=A(I)
      B(N)=T
      IF(N.EQ.NMAX) GO TO 94
      IF(T.GT.YMAX) YMAX=T
      IF(T.LT.YMIN) YMIN=T
      IF(T.LT.YMIN) IYMIN=N
      I2=I
   20 CONTINUE
      I1=ISKIP - (32 - I2)
      GO TO 10
   94 IF(NMAX.EQ.4096) GO TO 96
   95 IEND=9
   96 CONTINUE
      CALL CLOSE(3)
D     PAUSE
D     WRITE(6,1000) (B(I),I=1,N)
D1000 FORMAT(1X,10F7.1)
      RETURN
      END
