      subroutine PRODAT(EOF,Y1,Y2,N1,N2,NOTE11,NOTE12
     &, NOTE21,NOTE22,IDAT)
      include 'UNITS.INC'
      real Y1(1),Y2(1),X(7)
      integer EOF,N1,N2,IDAT,NOTE11(1),NOTE21(1),ID,KKDUM,J
      character*1 NOTE12(1),NOTE22(1), DUMMY
      EOF = 0
      ID = IDAT+3
      if (ID.gt.7) ID = 1
      N1 = 0
      N2 = 0
100   continue
      read (PLTLUN(MACHNO),err=150,end=140) KKDUM,J,DUMMY,X
      if (DUMMY.eq.'*') go to 110
      N1 = N1+1
      NOTE11(N1) = J
      NOTE12(N1) = DUMMY
      Y1(N1) = X(ID)
      go to 100
110   continue
120   continue
      read (PLTLUN(MACHNO),err=150,end=140) KKDUM,J,DUMMY,X
      if (DUMMY.eq.'*') go to 130
      N2 = N2+1
      NOTE21(N2) = J
      NOTE22(N2) = DUMMY
      Y2(N2) = X(ID)
      go to 120
130   continue
      return
140   continue
      EOF = 1
      go to 130
150   continue
      write (TTYOUT(MACHNO),5000)
5000  format (/1X,'Error while reading plot file. Task aborted.'/)
      EOF = 1
      go to 130
      end
