      character line*80,dsn*50
c
      write(6,*)
      write(6,*) 'Enter input file'
      read(5,'(a)') dsn
      open(10,file=dsn,form='formatted',status='old')
      write(6,*)
      write(6,*) 'Enter output file'
      read(5,'(a)') dsn
      open(11,file=dsn,form='formatted',status='new',
     &     carriagecontrol='list')
c
      iread = 0
      iline = 0
      iwrite = 0
   10 continue
       read(10,'(a80)',end=100) line
       iread = iread + 1
       iline = iline + 1
       if ( iline.gt.7 ) then
        line(1:1) = '|'
        line(8:8) = '|'
        line(15:15) = '|'
        line(23:23) = '|'
        line(80:80) = '|'
       end if
       write(11,'(a80)') line
       write(6,'(1x,a80)') line
       iwrite = iwrite + 1
       if ( iline.eq.55 ) iline = 0
      goto 10
  100 continue
      write(6,*)
      write(6,*) iread,' lines read'
      write(6,*) iwrite,' lines written'
      stop
      end
