C     PROG TO DO INPUT FROM CASSETT READ TO FILE WITH NO ECHO
      LOGICAL*1 ILINE(140),JLINE(140),FNAME(30)
      DIMENSION IPRM(6),JPRM(6),IST(2),JST(2)
      IFIRST=1
      WRITE(5,100)
  100 FORMAT(' PROGRAM TO INPUT FROM CASSETT RECORDER'/
     1 /'$NAME OF OUTPUT FILE ? ')
      READ(5,110)KQ,FNAME
  110 FORMAT(Q,30A1)
      CALL ASSIGN(1,FNAME,KQ)
      CALL GETADR(IPRM,ILINE)
      CALL GETADR(JPRM,JLINE)
      IPRM(2)=132
      JPRM(2)=132
C     INITIAL START TO GET INTO LOOP
      CALL QIO("001020,6,1,150,IST,IPRM,ISW)
      GOTO 210
  200 CALL QIO("001020,6,1,150,IST,IPRM,ISW)
      CALL WAITFR(2)
      CALL CLREF(2)
      IF(JST(1).LT.1)GOTO 300
      WRITE(1,220)(JLINE(I),I=IFIRST,JST(2))
  210 CALL QIO("001020,6,2,150,JST,JPRM,JSW)
C     NOW WAIT FOR FIRST QIO
      CALL WAITFR(1)
      CALL CLREF(1)
      IF(IST(1).LT.1)GOTO 300
      WRITE(1,220)(ILINE(I),I=IFIRST,IST(2))
  220 FORMAT(' ',120A1)
      IFIRST=2
      GOTO 200
  300 CALL CLOSE(1)
C     CANCEL ANY OUTSTANDING READ
      CALL WTQIO("000012,6,4,150,JST,JPRM,JSW)
      STOP
      END
