CTITL LINEMRGE.FTN - MERGE FILES OF PREVIOUSLY SPLIT LINES
      CHARACTER*12 FNAME
      CHARACTER*80 LINE
      OPEN(UNIT=4,FILE='mag.ndx',READONLY)
C OPEN THE FILE CONTAINING THE LIS TOF FILES TO JOIN
      OPEN(UNIT=7,FILE='../newmag.pt1',
     . RECL=80)
C OPEN THE OUTPUT FILE
   10 READ(4,100,END=40) FNAME
  100 FORMAT(A12)
      OPEN(UNIT=2,FILE=FNAME,READONLY)
   20 READ(2,200,END=25) LINE
  200 FORMAT(A80)
C     IF (LINE(1:1) .EQ. '9') THEN
C SPECIAL FOR FINGAL DATA
C     LINE(1:1)=' '
C     LINE(2:2)='9'
C     ENDIF
      WRITE(7,201) LINE
  201 FORMAT(A80)
      GOTO 20
C COPY
   25 CONTINUE
      CLOSE(UNIT=2)
      GOTO 10
C
   40 CONTINUE
      CLOSE(UNIT=7,STATUS='KEEP')
      CALL XIT
      END
      INCLUDE '/data/pe/xit.f'
