      SUBROUTINE LOCKOWN(wholockrec,iw,iown)

C     IOWN IS SET TO ONE IF USER IS OWNER OF LOCK FO
C     THIS PROBE, ZERO OTHERWISE

      character*(*) wholockrec
      character*15 WHOrec

      call clearstring(WHOrec,15)
      call getuser(WHOrec)
      call findlastchar(nsp,WHOrec,15)
      call findlastchar(nsp2,wholockrec,iw)

      if ( nsp .eq. nsp2 .and.
     * WHOrec(1:nsp) .eq. wholockrec(1:nsp) ) then
       iown=1
      else
       iown=0
      endif

      return
      end

