	SUBROUTINE CLSFIL(IFILE,ITRANS)
	LOGICAL*1 ILINE
	COMMON/OUTFIL/ ILINE(512),IPOS,IOTSUM,IONYBL,NOREC,IFLAGO,LENO
	COMMON/INPFIL/IPTR,IEND,INPSUM,INYBBL,IDELAY,IPRMPT,ISENT
     C			,LINE(256),ICHECK,LENI,IFLAGI,NIREC
	DATA IPTR/0/,IEND/0/
C
C	  COMES HERE IF HE TYPED A CTRL/C AFTER INPUTTING OR OUTPUTTING
C	  A FILE
C
	IF(IFILE.EQ.2) GOTO 10
	IF(IPOS.EQ.0) GOTO 7
	DO 5 I=IPOS+1,512
 5	ILINE(I)=0
	IF((ITRANS.AND."140).EQ.0) WRITE(7,6) (ILINE(I),I=1,IPOS)
 6	FORMAT(4(128A1))
	IF((ITRANS.AND."140).NE.0) WRITE(7'NOREC) ILINE
	IPOS=0
 7	ITRANS=(ITRANS.AND."177776)
	CLOSE(UNIT=7)
	RETURN
C
 10	IPTR=0
	IEND=0
	ITRANS=(ITRANS.AND."177775)
	CLOSE(UNIT=4)
	RETURN
	END
