        subroutine INREC(EOF,INUNIT,INLINE)
      include 'UNITS.INC'
      include 'INPAR.INC'
        integer EOF,INUNIT,I,max,LRAIL,IT
        character INLINE*80,DUMMY*1
      EOF = 0
      INPERR = 0
      if (DOFLAG.gt.0.and.INUNIT.ne.RPTLUN(MACHNO)) then
      open (unit=INUNIT,FILE=FILNAM(1),status='OLD',access='SEQUENTIAL',
     &form='FORMATTED')
         if (.not.(TOPOPN(MACHNO))) rewind INUNIT
         do 100 I = 1, DOFLAG
            read (INUNIT,5000,end=130,err=100) INLINE
100      continue
         DOFLAG = DOFLAG+1
         close (unit=INUNIT)
         max = LRAIL(INLINE,80)
         write (TTYOUT(MACHNO),5010) INLINE(1:max)
      else
         read (INUNIT,5000,end=140,err=150) INLINE
         max = LRAIL(INLINE,80)
      endif
5000  format (A80)
5010  format (' EXAMS/DO-> ',A)
      if (AUDFLG.eq.1.and.DOFLAG.eq.0.and.INUNIT.eq.TTYIN(MACHNO)) then
         open (unit=AUDLUN(MACHNO),file='AUDOUT.XMS',status='UNknown',
     &      access='SEQUENTIAL',form='FORMATTED')
         if (TOPOPN(MACHNO)) then
110         continue
            read (AUDLUN(MACHNO),5020,end=120) DUMMY
            go to 110
120         continue
            backspace AUDLUN(MACHNO)
         endif
         write (AUDLUN(MACHNO),5030) INLINE(1:max)
         endfile AUDLUN(MACHNO)
         close (unit=AUDLUN(MACHNO))
      endif
5020  format (A)
5030  format (' ',A)
      go to 160
130   continue
      IT = TTYIN(MACHNO)
      TTYIN(MACHNO) = DOLUN(MACHNO)
      DOLUN(MACHNO) = IT
      DOFLAG = 0
      close (unit=DOLUN(MACHNO))
      INLINE = ' '
140   continue
      EOF = 1
      go to 160
150   continue
      INPERR = 1
160   continue
      return
      end
