Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pick > list-locks to d...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 3414 of 3601
Post > Topic >>

list-locks to deduce filenames

by "Frank Winans" <fwinans@[EMAIL PROTECTED] > Mar 19, 2008 at 01:15 PM

I was pleasantly surprised to see that in D3,
the basic command   READU   can assert
a lock on a planned item name even before you
create the item.

Since that lock, and that filename, show up in the
output of TCL verb LIST-LOCKS,  it seems this
lets a subroutine find out the actual filename of an
open file handle it gets, for example via either
    MYSUB(myfile)
or
    COMMON myfile
In other words, just have the subroutine  READU
an item id known not to exist, then
EXECUTE "LIST-LOCKS"  CAPTURING STUFF
and paw through STUFF for the filename on the same
line as you see your mythical item name.
Suggestion:  use  id =  'mycroftxxx':SYSTEM(22)
    {system(22) is your pick ****t number} as test item id.

Also , here's an example of READU three-clause usage;

READU    myfile,  "george"    LOCKED
   CRT   'name george is locked by someone else;':
   CRT   '  item may or may not exist'
END THEN
   CRT   'george did exist, and we now own a lock on that name'
END ELSE
   CRT   'george  does not exist, but we now own a lock on the name'
END
 




 6 Posts in Topic:
list-locks to deduce filenames
"Frank Winans"   2008-03-19 13:15:59 
Re: list-locks to deduce filenames
rockingred <willsteve2  2008-03-27 06:26:18 
Re: list-locks to deduce filenames
"Frank Winans"   2008-03-27 09:38:37 
Re: list-locks to deduce filenames
Ross Ferris <rossf@[EM  2008-03-27 19:12:18 
Re: list-locks to deduce filenames
Mike Preece <michael@[  2008-03-31 01:45:35 
Re: list-locks to deduce filenames
Scott Ballinger <scott  2008-03-31 07:53:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Wed Jul 9 1:27:49 CDT 2008.