      SUBROUTINE READMERGELINE(cline,lsize,probelockrec,ip,
     * lockstat,il,wholockrec,iw,timerec,it,whatrec,iw2)

C     READMERGELINE READS IN A LINE FROM
C     THE MERGELOCK FILE AND PLACES THE
C     INFORMATION IN THE APPROPRIATE FIELDS

      parameter (icmax=10)
      character*(*) probelockrec
      character*(*) cline
      character*(*) lockstat
      character*(*) wholockrec
      character*(*) timerec
      character*(*) whatrec
      dimension icomma(icmax,2)

      call spacefindl(lsize,icmax,ncomma,icomma,cline)

      call clearstring(probelockrec,ip)
      call clearstring(lockstat,il)
      call clearstring(wholockrec,iw)
      call clearstring(timerec,it)
      call clearstring(whatrec,iw2)
      probelockrec(1:icomma(1,2))=
     * cline(icomma(1,1):icomma(1,1)+icomma(1,2)-1)
      lockstat(1:icomma(2,2))=
     * cline(icomma(2,1):icomma(2,1)+icomma(2,2)-1)
      if ( ncomma .gt. 2 ) then
       wholockrec(1:icomma(3,2))=
     *  cline(icomma(3,1):icomma(3,1)+icomma(3,2)-1)
       timerec(1:icomma(4,2))=
     *  cline(icomma(4,1):icomma(4,1)+icomma(4,2)-1)
       if ( ncomma .gt. 4 ) then
        whatrec(1:icomma(5,2))=
     *   cline(icomma(5,1):icomma(5,1)+icomma(5,2)-1)
       endif
      endif

      return
      end
