CTITL LINEMRGE.FTN - MERGE FILES OF PREVIOUSLY SPLIT LINES
      CHARACTER*12 FNAME
      CHARACTER*144 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=144)
C OPEN THE OUTPUT FILE
   10 READ(4,811,END=40) FNAME
  811 FORMAT(A12)
      OPEN(UNIT=2,FILE=FNAME,READONLY)
   20 READ(2,911,END=25) LINE
  911 FORMAT(A144)
      WRITE(7,912) LINE
  912 FORMAT(A144)
      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'
