      SUBROUTINE REMLOG(TITLE)
C       INCLUDE 'REMAPP.HDR'
C       LOGS FILE INTERACTIONS TO REMAPP.LOG
C       LINK WITH DATE,TIME,EXIT
      LOGICAL LUOPEN
      CHARACTER*4 IDATE(3),ITIME(3)
      CHARACTER TITLE*(*)
      INQUIRE(4,OPENED=LUOPEN)
      IF(.NOT.LUOPEN) THEN
         OPEN(4,FILE='REMAPP.LOG',STATUS='UNKNOWN',FORM='FORMATTED',
     &   RECL=128,IOSTAT=ISTAT,ACCESS='SEQUENTIAL')
         IF(ISTAT.NE.0) THEN
            WRITE(6,*)' UNABLE TO OPEN LOG FILE. STATUS = ',ISTAT
            CALL EXIT(255)
         ENDIF
      ENDIF
      CALL DATE(IDATE)
      CALL TIME(ITIME)
10    READ (4,*,END=20)
      GOTO 10
20    CONTINUE
      BACKSPACE(4)
      WRITE(4,*)
      WRITE(4,*)
      WRITE(4,*) 'REMAPP PC IMAGE PROCESSING SYSTEM - U. S. G. S.'
      WRITE(4,9) IDATE,ITIME,TITLE
9     FORMAT(1X,3A4,3A4,'---- ',A,' ----')
      RETURN
      END
