Here is a little program called UNLOCK.ME.  I hope that it is of some use.

--Bill

*---------------------------------------------------------

  clear

  prompt ''

  open 'SYS.CTL'    to  F.SYS.CTL     else  null
  open 'LOCK.FILE'  to  F.LOCK.FILE   else  null

*---------------------------------------------------------------------------
--
First.Screen:

  crt @(-1)

  execute 'LIST LOCK.FILE user*port FILE.ID FILE.KEY DATE TIME ID.SUP'

  crt
  crt '  _____________  '
  crt ' /             \ '
  crt ' \  UnLock.Me  / '
  crt '  \___________/ '
  
  crt
  crt ' <user.to.clear>  <all>  <x> ': ; input login.name

  login.name = downcase(login.name)

  begin case 
        case login.name = 'x'   ;  go The.End
        case login.name = ''    ;  crt @(-1)  ;  sleep  ;  go First.Screen
        case login.name = 'all' ;  go Contact.Screen
  end   case
      
*---------------------------------------------------------------------------
---
Get.User.Nbr:

  crt
  crt '  <port>            <x> ':;  input User.Nbr

  User.Nbr = downcase(User.Nbr)    

  begin case
        case User.Nbr = 'all' ;  null
        case User.Nbr = 'x'   ;  go The.End
        case User.Nbr < 0     ;  go First.Screen
        case User.Nbr > 45    ;  go First.Screen
          case 1                ;  go Get.User.Nbr 
  end   case

*---------------------------------------------------------------------------
---
Contact.Screen:
      
  crt '  ---------------------------------------------------------------'  
  crt '   please contact        ' : login.name : '      asking if ok to
clear'
  crt
  crt '   continue ?     <yes> ': ; input Ans
  crt

  Ans = downcase(Ans)

  begin case
        case Ans = 'yes'   ;  go Begin.Clearing:
        case 1             ;  go The.End
  end   case  

*---------------------------------------------------------------------------
--------
Begin.Clearing:

  crt @(-1)
  crt @(1,11):'Clearing... ':
      
  begin case
        case login.name = 'all'  ;  Cmd = 'SELECT LOCK.FILE ';

        case User.Nbr   = 'all'  ;  Cmd = 'SELECT LOCK.FILE WITH PORT LIKE
"':login.name:'*..."'  
        case 1                   ;  Cmd = 'SELECT LOCK.FILE WITH PORT = "'
:login.name:"*":User.Nbr:'" '
  end   case

  execute Cmd
      
  EOJ = 0
  Record.Count = 0

  loop
    readnext ID else EOJ = 1 UNTIL EOJ = 1 do

      delete F.LOCK.FILE,ID
      Record.Count = Record.Count + 1

      crt @(10,18):'Locks cleared ':Record.Count
      crt @(10,19):'Record ':ID:' cleared.'

  repeat

  crt 
  crt
  crt 'Program completed.   [<]' :; input Ans
  crt
  crt 
      
*---------------------------------------------------------------------------
---
The.End:
  
  crt @(-1)

END

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Doug Chanco
Sent: Friday, December 07, 2007 11:44 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] LIST.READU


Hello all,

     I am back in the universe world after working in jBASE for many
years now, is there a better tool than LIST.READU to show the locking
table? (similar to jBASE SHOW-ITEM-LOCKS which is pretty awesome)



It shows record locks BUT not what file the lock is on ....... I am
still learning our system and seeing a lock like "123456789" does not
tell me anything about what file the lock is on, I suppose I might be
able to figure out something with the inode but still ......



Active Record Locks:

Device.... Inode....  Netnode Userno  Lmode   Pid Login Id
Item-ID.............

3080194    446496        0    142  10 RU 59788 12673    16151029

3080194    338920        0    142  12 RU 59788 12673    16151029



Is anyone aware of a better tool?



Thanks



Dougc
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to