RE: [U2] Locks, releases and STATU() (oh my)
If the OS is a redhat linux then LIST.READU looks like this : >LIST.READU DETAIL Active Record Locks: Device Inode Netnode Userno Lmode Pid Login Id Item-ID. 2065 33259650 16 11 RU 26105 LP xx*13442*09:36:55*ME 2065 33259650 19 65 RU 26233 ED yy*13575*10:58:28*LE So its just a matter of parsing the output of that to get the user best regards from denmark Claus Derlien Frie Funktion+AOY-rer - faglig organisation og tv+AOY-rfaglig a-kasse - www.f-f.dk *** Denne email og alle filer vedlagt som bilag kan indeholde fortroligt materiale, der kun er beregnet for adressaten, og maa ikke udleveres eller kopieres til uvedkommende. Har De ved en fejltagelse modtaget denne email, bedes De venligst omgaaende meddele os dette pr. telefon : 6313 8550. Paa forhaand tak. *** This email and any files transmitted with it may contain confidential information intended for the addressee(s) only. The information is not to be surrendered or copied to unauthorised persons. If you have received this communication in error, please notify us immediately by telephone: +-45 6313 8550. Thank you. *** --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Locks, releases and STATU() (oh my)
I am *loving* GETREADU()... who knew? Thanks to Jeff for the parsing program too, fantastic! --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
Yes, it was really bizarre. I pulled out my support call and found I was wrong about the versions - it was broken in 6.0.2 and fixed after (at least on Windows). Here are my testing notes: The only pattern I've found is that if I use SBClient and start a GUI session then use "0" to get the command prompt the list.readu will work. If I start a windows telnet session at this time the list.readu will also work in that session. The SBClient session will stop working if I return to the menu (MM) and go to the TCL prompt (/TCL) whether or not a command is run. The windows telnet will continue to work until I close it and start a new session. If I have SBClient shutdown and create two windows telnet sessions the list.readu will not work. It looks like *something* is getting set with the SBClient session. Didn't get a lot of detail back from IBM something about a structure not being initialized properly or at the right time. I did get a patched .exe and .dll that resolved the problem. It was actually a fix for a problem with selects Colin >-Original Message- >From: Kevin King > >That sounds a little bizarre. Do you recall any details of >why this might have been so? > >-Original Message- >From: Alfke, Colin > >Ooops, I thing I forgot to mention. On some versions of UniData >(5.2.4?) doing a /TCL in SB+ will cause UniData to not output >information with LIST.READU. I don't recall if there is also a >problem with GETREADU() - plus it's already in an array so you >don't have to trim and parse >(truncated) data (unless you use the DETAIL modifier).. > >This was corrected in 6.0.2. > >Hth >Colin Alfke >Calgary, Canada --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Locks, releases and STATU() (oh my)
I'm on 9.6.1.4 Bob Woodward wrote: >LIST.READU DETAIL works in our 10.1 version of Universe. What version >are you on, Dianne? > >Bob W > > > > >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:owner-u2- >>[EMAIL PROTECTED] On Behalf Of Dianne Ackerman >>Sent: Thursday, April 14, 2005 10:25 AM >>To: u2-users@listserver.u2ug.org >>Subject: Re: [U2] Locks, releases and STATU() (oh my) >> >>Is that DETAIL keyword for LIST.READU just for Unidata? Doesn't seem >> >> >to > > >>work on Universe. >>-Dianne >> >>Wally Terhune wrote: >> >> >> >>>other resources include: >>>LIST.QUEUE and related GETQUEUE() UniBasic function - both show users >>>queued up for a lock (those users would not be using the LOCKED >>> >>> >clause). > > >>>LIST.READU (noted) and GETREADU() function. >>>Don't forget the DETAIL keyword on LIST.READU and LIST.QUEUE to show >>> >>> >full > > >>>data - not truncated to fit in 80 column display. >>> >>>Wally Terhune >>>Manager - U2 Advanced Technical Services >>>IBM Information Management Solutions >>>Tel: 303.294.4866 Fax: 303.294.4832 >>>[EMAIL PROTECTED] >>> >>>www.ibm.com/software/data/u2/support - Open, Query, Update, Search - >>>Online! >>> >>> >>> >>>"Mike Randall" >>><[EMAIL PROTECTED] >>>cast.net> >>> >>> >>To >> >> >>>Sent by: >>>[EMAIL PROTECTED] >>> >>> >>cc >> >> >>>stserver.u2ug.org >>> >>> >>> >>Subject >> >> >>> RE: [U2] Locks, releases and >>>04/14/2005 09:47 STATU() (oh my) >>>AM >>> >>> >>>Please respond to >>> u2-users >>> >>> >>> >>> >>> >>> >>>Think LIST.READU is what you are looking for. LIST.LOCKS only >>> >>> >displays > > >>>the >>>64 semaphore locks which I don't think are too common anymore. >>> >>>Trick with LIST.READU was equating the file number to the proper >>> >>> >data > > >>file >> >> >>>if you were doing it programmatically. >>> >>> >>>-Original Message- >>>From: [EMAIL PROTECTED] >>>[mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn >>>Sent: Thursday, April 14, 2005 10:33 AM >>>To: u2-users@listserver.u2ug.org >>>Subject: [U2] Locks, releases and STATU() (oh my) >>> >>>Hello wizards, >>> >>>I've read what I can find on the subject, but I'm not finding what I >>> >>> >>need. >> >> >>>As usual, anyone who knows where the info is, I would not be the >>> >>> >least > > >>bit >> >> >>>offended if you just point. Or if you know off-hand ... >>> >>>(Presently grappling with Unidata): >>> >>>When I hit a lock with a: >>>READU this FROM that,ID LOCKED locked clause ELSE whatever >>> >>>LIST.LOCKS from TCL has always been worse than useless for me. For >>> >>> >>example >> >> >>>at this exact moment I'm holding locks on 3 sessions, yet if I run >>>LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. >>> >>>I don't see much on offer in the LOCKED clause, although the online >>> >>> >help > > >>>suggests that STATUS() will return the user number of the lock it ran >>> >>> >>into. >> >> >>>Can't understand its output... I have a very short program that >>> >>> >displays > > >>>STATUS(), opens the file and displays STATUS() then does a READU >>> >>> >against > > >>an >> >> >>>item I purposefully have locked on another session and I display >>> >>> >STATUS() > > >>>a >>>third time. What do you suppose its giving me, and what can I do >>> >>> >with > > >>it? >> >> >>>1 STATUS = 0 <-- beginning of program >>>2 STATUS = 1 <-- after the open >>>3 STATUS = 197613 <-- this is what it gives me after the READU >>> >>> >against a > > >>>locked item >>> >>>What I want to do is determine who/what has the lock, tell the user, >>> >>> >I > > >>also >> >> >>>want to be able to carry on under my own conditions when ud 46 flag >>> >>> >is > > >>set >> >> >>>which will by default allow edits to items I've locked against my own >>>session. Which is too loose -- I want to check to make sure I'm in >>> >>> >the > > >>>exact right condition to do that and I'm not sure how I can (by >>> >>> >seeing > > >>what >> >> >>>is holding the lock) but ... does anyone know how to get ANY >>> >>> >information > > >>>out >>>of a lock? >>> >>>Susan >>>-- >>> >>> >>--- --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Locks, releases and STATU() (oh my)
> Jeff.. Can't do attachments here. It the code reasonable length where you > can just included it in the body of an email? R.PH = GETREADU() P= -1 Y = 25 PRINT @(-1): MAX = COUNT(R.PH,@FM) + (R.PH #'') FOR CNT = 1 TO MAX Y += 1 IF Y > 21 THEN P += 1 IF P > 0 THEN PRINT @(0,23):'RETURN TO CONTINUE :': INPUT CR IF CR[1,1] = 'S' OR CR[1,1] = 'Q' OR CR[1,1] = 'E' THEN PRINT STOP END END Y = 2 PRINT @(-1):' RECORD LOCKS' PRINT ' UID PORT LOGINS... FILE NAME...': PRINT 'RECORD KEY.. ..TIME.. ...DATE..' END PORT = FIELD(R.PH'/',1,1) FPOS = COUNT(R.PH,'/')+(R.PH#'') FNAME = FIELD(R.PH,'/',FPOS,1) PRINT @(0,Y):FMT(R.PH,'R#5'):' ':FMT(PORT,'R#4'): PRINT ' ':FMT(R.PH,'L#8'):' ':FMT(FNAME,'L#20'): PRINT ' ':FMT(R.PH,'L#20'):' ':FMT(R.PH,'R#8'): PRINT ' ':FMT(R.PH,'L#12') NEXT CNT --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
That sounds a little bizarre. Do you recall any details of why this might have been so? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alfke, Colin Sent: Thursday, April 14, 2005 10:06 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Locks, releases and STATU() (oh my) Ooops, I thing I forgot to mention. On some versions of UniData (5.2.4?) doing a /TCL in SB+ will cause UniData to not output information with LIST.READU. I don't recall if there is also a problem with GETREADU() - plus it's already in an array so you don't have to trim and parse (truncated) data (unless you use the DETAIL modifier).. This was corrected in 6.0.2. Hth Colin Alfke Calgary, Canada >-Original Message- >From: Kevin King > >The 197613 is the ID of the user session. The trick is to translate >this to a user ID. SB+ appears to be doing this with the SB.DISP.LOCK >routine, though I'm not certain how they're doing that translation. > >Oh, here's a thought. From BASIC, EXECUTE a LIST.READU, capture the >output, and then trim each line of the response. >Once a line is trimmed, field out the process ID in the third position; >if it's the process ID returned by STATUS() then get the port number >from the first position. You could then use that to read the $PASSport >record which will tell you who is logged in on that port (in <7>) and a >whole bunch of other stuff. > >-Kevin >[EMAIL PROTECTED] >http://www.PrecisOnline.com --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 4/14/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 4/14/2005 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
LIST.READU DETAIL works in our 10.1 version of Universe. What version are you on, Dianne? Bob W > -Original Message- > From: [EMAIL PROTECTED] [mailto:owner-u2- > [EMAIL PROTECTED] On Behalf Of Dianne Ackerman > Sent: Thursday, April 14, 2005 10:25 AM > To: u2-users@listserver.u2ug.org > Subject: Re: [U2] Locks, releases and STATU() (oh my) > > Is that DETAIL keyword for LIST.READU just for Unidata? Doesn't seem to > work on Universe. > -Dianne > > Wally Terhune wrote: > > >other resources include: > >LIST.QUEUE and related GETQUEUE() UniBasic function - both show users > >queued up for a lock (those users would not be using the LOCKED clause). > >LIST.READU (noted) and GETREADU() function. > >Don't forget the DETAIL keyword on LIST.READU and LIST.QUEUE to show full > >data - not truncated to fit in 80 column display. > > > >Wally Terhune > >Manager - U2 Advanced Technical Services > >IBM Information Management Solutions > >Tel: 303.294.4866 Fax: 303.294.4832 > >[EMAIL PROTECTED] > > > >www.ibm.com/software/data/u2/support - Open, Query, Update, Search - > >Online! > > > > > > > > "Mike Randall" > > <[EMAIL PROTECTED] > > cast.net> > To > > Sent by: > > [EMAIL PROTECTED] > cc > > stserver.u2ug.org > > > Subject > > RE: [U2] Locks, releases and > > 04/14/2005 09:47 STATU() (oh my) > > AM > > > > > > Please respond to > > u2-users > > > > > > > > > > > > > >Think LIST.READU is what you are looking for. LIST.LOCKS only displays > >the > >64 semaphore locks which I don't think are too common anymore. > > > >Trick with LIST.READU was equating the file number to the proper data > file > >if you were doing it programmatically. > > > > > >-Original Message- > >From: [EMAIL PROTECTED] > >[mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn > >Sent: Thursday, April 14, 2005 10:33 AM > >To: u2-users@listserver.u2ug.org > >Subject: [U2] Locks, releases and STATU() (oh my) > > > >Hello wizards, > > > >I've read what I can find on the subject, but I'm not finding what I > need. > >As usual, anyone who knows where the info is, I would not be the least > bit > >offended if you just point. Or if you know off-hand ... > > > >(Presently grappling with Unidata): > > > >When I hit a lock with a: > >READU this FROM that,ID LOCKED locked clause ELSE whatever > > > >LIST.LOCKS from TCL has always been worse than useless for me. For > example > >at this exact moment I'm holding locks on 3 sessions, yet if I run > >LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. > > > >I don't see much on offer in the LOCKED clause, although the online help > >suggests that STATUS() will return the user number of the lock it ran > into. > >Can't understand its output... I have a very short program that displays > >STATUS(), opens the file and displays STATUS() then does a READU against > an > >item I purposefully have locked on another session and I display STATUS() > >a > >third time. What do you suppose its giving me, and what can I do with > it? > > > >1 STATUS = 0 <-- beginning of program > >2 STATUS = 1 <-- after the open > >3 STATUS = 197613 <-- this is what it gives me after the READU against a > >locked item > > > >What I want to do is determine who/what has the lock, tell the user, I > also > >want to be able to carry on under my own conditions when ud 46 flag is > set > >which will by default allow edits to items I've locked against my own > >session. Which is too loose -- I want to check to make sure I'm in the > >exact right condition to do that and I'm not sure how I can (by seeing > what > >is holding the lock) but ... does anyone know how to get ANY information > >out > >of a lock? > > > >Susan > >-- > --- > 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/
RE: [U2] Locks, releases and STATU() (oh my)
We are running Avante, on Universe, on HPUX so I developed this small program to grab the LIST.READU output, locate the filenames (it only looks at production files) and display the lines with the filenames. Since the part number is also an important field for us, I display it rather then the internal part number. Here is the program- FINDCMD="CSH -c 'find /usr/igi/flodata/live/LIVE.DATA -inum " INUMS="" FNAMS="" IMOPEN=0 IF @WHO = "uv" THEN QPTR="ITMMST.PROD" ELSE QPTR="ITMMST" OPEN "VOC" TO MYVOC ELSE GOTO 10 READ VOCREC FROM MYVOC,QPTR ELSE GOTO 10 CLOSE MYVOC OPEN QPTR TO IMFILE ELSE GOTO 10 IMOPEN=1 10 GOTRECLOCK=0 EXECUTE "LIST.READU EVERY" CAPTURING XX NXX=DCOUNT(XX,@AM) FOR I=1 TO NXX YY=XX * Sample - * 1073807361 314630257 23 RU 13667 JOEUSER G000396500 * Active Read Waiters: Owner Waiter * Device Inode Userno Userno *107380736311400 88 145 FIRST19=YY[1,19] IF FIRST19 = "Active Record Locks" THEN GOTRECLOCK = 1 IF GOTRECLOCK = 0 THEN CONTINUE IF FIRST19 = "Active Read Waiters" THEN GOTRECLOCK = 2 IF GOTRECLOCK = 2 THEN GOTO 30 ZZ=YY[11,10] VV="" LOCATE(ZZ,INUMS;LOC1;"AL") THEN VV=FNAMS ; GOTO 20 IF NUM(ZZ) THEN EXECUTE FINDCMD:ZZ:"'" CAPTURING WW ELSE WW="" IF WW # "" THEN UU=DCOUNT(WW,"/") VV=WW["/",UU,1] VV=VV<1> END INS ZZ BEFORE INUMS INS VV BEFORE FNAMS 20 IF VV # "" THEN IF VV = "ITMMST" OR VV = "INVPLAN" THEN IF IMOPEN THEN THEKEY=YY[60,5] READV PARTNBR FROM IMFILE,THEKEY,1 ELSE PARTNBR="NO IM" YY[LEN(PARTNBR)+4]=" (":PARTNBR:")" END END VV:=" " YY[1,20]=VV[1,20] END 30 PRINT YY NEXT I I cataloged this globally for all "realms" to see. -- Rod Hills -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn Sent: Thursday, April 14, 2005 8:33 AM To: u2-users@listserver.u2ug.org Subject: [U2] Locks, releases and STATU() (oh my) Hello wizards, I've read what I can find on the subject, but I'm not finding what I need. As usual, anyone who knows where the info is, I would not be the least bit offended if you just point. Or if you know off-hand ... (Presently grappling with Unidata): When I hit a lock with a: READU this FROM that,ID LOCKED locked clause ELSE whatever LIST.LOCKS from TCL has always been worse than useless for me. For example at this exact moment I'm holding locks on 3 sessions, yet if I run LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. I don't see much on offer in the LOCKED clause, although the online help suggests that STATUS() will return the user number of the lock it ran into. Can't understand its output... I have a very short program that displays STATUS(), opens the file and displays STATUS() then does a READU against an item I purposefully have locked on another session and I display STATUS() a third time. What do you suppose its giving me, and what can I do with it? 1 STATUS = 0 <-- beginning of program 2 STATUS = 1 <-- after the open 3 STATUS = 197613 <-- this is what it gives me after the READU against a locked item What I want to do is determine who/what has the lock, tell the user, I also want to be able to carry on under my own conditions when ud 46 flag is set which will by default allow edits to items I've locked against my own session. Which is too loose -- I want to check to make sure I'm in the exact right condition to do that and I'm not sure how I can (by seeing what is holding the lock) but ... does anyone know how to get ANY information out of a lock? Susan --- 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/
[U2] Locks, releases and STATU() (oh my)
Awesome info and suggestion. Thanks so much! (I'll be back, looking to do the same stuff in uv if its different/gives me trouble). --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
Jeff.. Can't do attachments here. It the code reasonable length where you can just included it in the body of an email? And as a side note.. If you have SB+ they have a /LOCKS command which does show more info, including the real file name. I was even able to edit the screen used to make the length of some fields longer to make it more usable. Thanks, Marilyn A. Hilb Value Part, Inc Direct: 847-918-6099 Fax: 847-367-1892 [EMAIL PROTECTED] www.valuepart.com -Original Message- From: Jeffrey Butera [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 12:07 PM To: u2-users@listserver.u2ug.org Subject:Re: [U2] Locks, releases and STATU() (oh my) Attached is a small UD program that nicely formats the output from GETREADU. As most Datatel clients know, if you have a UD table buried down one (or more) directories, the output from LIST.READU is almost useless because it shows the relative pathname (which doesn't fit in 8 characters). The attached program neatly parses out the data. Can say if this works well on UV (but if it has GETREADU like UD, I imagine it'll work fine). -- Jeff Butera, Ph.D. Administrative Systems Hampshire College [EMAIL PROTECTED] 413-559-5556 "...our behavior matters more than the beliefs that we profess." Elizabeth Deutsch Earle * R.PH = GETREADU() P= -1 Y = 25 PRINT @(-1): MAX = COUNT(R.PH,@FM) + (R.PH #'') FOR CNT = 1 TO MAX Y += 1 IF Y > 21 THEN P += 1 IF P > 0 THEN PRINT @(0,23):'RETURN TO CONTINUE :': INPUT CR IF CR[1,1] = 'S' OR CR[1,1] = 'Q' OR CR[1,1] = 'E' THEN PRINT STOP END END Y = 2 PRINT @(-1):' RECORD LOCKS' PRINT ' UID PORT LOGINS... FILE NAME...': PRINT 'RECORD KEY.. ..TIME.. ...DATE..' END PORT = FIELD(R.PH'/',1,1) FPOS = COUNT(R.PH,'/')+(R.PH#'') FNAME = FIELD(R.PH,'/',FPOS,1) PRINT @(0,Y):FMT(R.PH,'R#5'):' ':FMT(PORT,'R#4'): PRINT ' ':FMT(R.PH,'L#8'):' ':FMT(FNAME,'L#20'): PRINT ' ':FMT(R.PH,'L#20'):' ':FMT(R.PH,'R#8'): PRINT ' ':FMT(R.PH,'L#12') NEXT CNT --- 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/
Re: [U2] Locks, releases and STATU() (oh my)
Is that DETAIL keyword for LIST.READU just for Unidata? Doesn't seem to work on Universe. -Dianne Wally Terhune wrote: other resources include: LIST.QUEUE and related GETQUEUE() UniBasic function - both show users queued up for a lock (those users would not be using the LOCKED clause). LIST.READU (noted) and GETREADU() function. Don't forget the DETAIL keyword on LIST.READU and LIST.QUEUE to show full data - not truncated to fit in 80 column display. Wally Terhune Manager - U2 Advanced Technical Services IBM Information Management Solutions Tel: 303.294.4866 Fax: 303.294.4832 [EMAIL PROTECTED] www.ibm.com/software/data/u2/support - Open, Query, Update, Search - Online! "Mike Randall" <[EMAIL PROTECTED] cast.net> To Sent by: [EMAIL PROTECTED] cc stserver.u2ug.org Subject RE: [U2] Locks, releases and 04/14/2005 09:47 STATU() (oh my) AM Please respond to u2-users Think LIST.READU is what you are looking for. LIST.LOCKS only displays the 64 semaphore locks which I don't think are too common anymore. Trick with LIST.READU was equating the file number to the proper data file if you were doing it programmatically. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn Sent: Thursday, April 14, 2005 10:33 AM To: u2-users@listserver.u2ug.org Subject: [U2] Locks, releases and STATU() (oh my) Hello wizards, I've read what I can find on the subject, but I'm not finding what I need. As usual, anyone who knows where the info is, I would not be the least bit offended if you just point. Or if you know off-hand ... (Presently grappling with Unidata): When I hit a lock with a: READU this FROM that,ID LOCKED locked clause ELSE whatever LIST.LOCKS from TCL has always been worse than useless for me. For example at this exact moment I'm holding locks on 3 sessions, yet if I run LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. I don't see much on offer in the LOCKED clause, although the online help suggests that STATUS() will return the user number of the lock it ran into. Can't understand its output... I have a very short program that displays STATUS(), opens the file and displays STATUS() then does a READU against an item I purposefully have locked on another session and I display STATUS() a third time. What do you suppose its giving me, and what can I do with it? 1 STATUS = 0 <-- beginning of program 2 STATUS = 1 <-- after the open 3 STATUS = 197613 <-- this is what it gives me after the READU against a locked item What I want to do is determine who/what has the lock, tell the user, I also want to be able to carry on under my own conditions when ud 46 flag is set which will by default allow edits to items I've locked against my own session. Which is too loose -- I want to check to make sure I'm in the exact right condition to do that and I'm not sure how I can (by seeing what is holding the lock) but ... does anyone know how to get ANY information out of a lock? Susan -- --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Locks, releases and STATU() (oh my)
Attached is a small UD program that nicely formats the output from GETREADU. As most Datatel clients know, if you have a UD table buried down one (or more) directories, the output from LIST.READU is almost useless because it shows the relative pathname (which doesn't fit in 8 characters). The attached program neatly parses out the data. Can say if this works well on UV (but if it has GETREADU like UD, I imagine it'll work fine). -- Jeff Butera, Ph.D. Administrative Systems Hampshire College [EMAIL PROTECTED] 413-559-5556 "...our behavior matters more than the beliefs that we profess." Elizabeth Deutsch Earle * R.PH = GETREADU() P= -1 Y = 25 PRINT @(-1): MAX = COUNT(R.PH,@FM) + (R.PH #'') FOR CNT = 1 TO MAX Y += 1 IF Y > 21 THEN P += 1 IF P > 0 THEN PRINT @(0,23):'RETURN TO CONTINUE :': INPUT CR IF CR[1,1] = 'S' OR CR[1,1] = 'Q' OR CR[1,1] = 'E' THEN PRINT STOP END END Y = 2 PRINT @(-1):' RECORD LOCKS' PRINT ' UID PORT LOGINS... FILE NAME...': PRINT 'RECORD KEY.. ..TIME.. ...DATE..' END PORT = FIELD(R.PH'/',1,1) FPOS = COUNT(R.PH,'/')+(R.PH#'') FNAME = FIELD(R.PH,'/',FPOS,1) PRINT @(0,Y):FMT(R.PH,'R#5'):' ':FMT(PORT,'R#4'): PRINT ' ':FMT(R.PH,'L#8'):' ':FMT(FNAME,'L#20'): PRINT ' ':FMT(R.PH,'L#20'):' ':FMT(R.PH,'R#8'): PRINT ' ':FMT(R.PH,'L#12') NEXT CNT --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
Ooops, I thing I forgot to mention. On some versions of UniData (5.2.4?) doing a /TCL in SB+ will cause UniData to not output information with LIST.READU. I don't recall if there is also a problem with GETREADU() - plus it's already in an array so you don't have to trim and parse (truncated) data (unless you use the DETAIL modifier).. This was corrected in 6.0.2. Hth Colin Alfke Calgary, Canada >-Original Message- >From: Kevin King > >The 197613 is the ID of the user session. The trick is to >translate this to a user ID. SB+ appears to be doing this >with the SB.DISP.LOCK routine, though I'm not certain how >they're doing that translation. > >Oh, here's a thought. From BASIC, EXECUTE a LIST.READU, >capture the output, and then trim each line of the response. >Once a line is trimmed, field out the process ID in the third >position; if it's the process ID returned by STATUS() then get >the port number from the first position. You could then use >that to read the $PASSport record which will tell you who is >logged in on that port (in <7>) and a whole bunch of other stuff. > >-Kevin >[EMAIL PROTECTED] >http://www.PrecisOnline.com --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
Like Mike said, you want to use LIST.READU (or LIST.QUEUE) to see the locks. However, UniData, unlike UniVerse does have the file name and not just the number. The Status() after a readu gives you the UID (pid) of the process that has the record locked. You can parse it out of the array returned with GETREADU(). This is like capturing the LIST.READU output. You can get the user You may also find RECORDLOCKED handy. The TCL HELP should give you what you need for these. Hth Colin Alfke Calgary - I can't believe it snowed this morning - Canada >-Original Message- >From: Susan Joslyn > >Hello wizards, > >I've read what I can find on the subject, but I'm not finding >what I need. >As usual, anyone who knows where the info is, I would not be >the least bit offended if you just point. Or if you know off-hand ... > >(Presently grappling with Unidata): > >When I hit a lock with a: >READU this FROM that,ID LOCKED locked clause ELSE whatever > >LIST.LOCKS from TCL has always been worse than useless for me. > For example at this exact moment I'm holding locks on 3 >sessions, yet if I run LIST.LOCKS on a 4th session it displays >ABSOLUTELY NOTHING. > >I don't see much on offer in the LOCKED clause, although the >online help suggests that STATUS() will return the user number >of the lock it ran into. >Can't understand its output... I have a very short program >that displays STATUS(), opens the file and displays STATUS() >then does a READU against an item I purposefully have locked >on another session and I display STATUS() a third time. What >do you suppose its giving me, and what can I do with it? > >1 STATUS = 0 <-- beginning of program >2 STATUS = 1 <-- after the open >3 STATUS = 197613 <-- this is what it gives me after the READU >against a locked item > >What I want to do is determine who/what has the lock, tell the >user, I also want to be able to carry on under my own >conditions when ud 46 flag is set which will by default allow >edits to items I've locked against my own session. Which is >too loose -- I want to check to make sure I'm in the exact >right condition to do that and I'm not sure how I can (by >seeing what is holding the lock) but ... does anyone know how >to get ANY information out of a lock? > >Susan --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
LIST.READU DETAIL >>> [EMAIL PROTECTED] 4/14/05 10:47:31 AM >>> Think LIST.READU is what you are looking for. LIST.LOCKS only displays the 64 semaphore locks which I don't think are too common anymore. Trick with LIST.READU was equating the file number to the proper data file if you were doing it programmatically. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn Sent: Thursday, April 14, 2005 10:33 AM To: u2-users@listserver.u2ug.org Subject: [U2] Locks, releases and STATU() (oh my) Hello wizards, I've read what I can find on the subject, but I'm not finding what I need. As usual, anyone who knows where the info is, I would not be the least bit offended if you just point. Or if you know off-hand ... (Presently grappling with Unidata): When I hit a lock with a: READU this FROM that,ID LOCKED locked clause ELSE whatever LIST.LOCKS from TCL has always been worse than useless for me. For example at this exact moment I'm holding locks on 3 sessions, yet if I run LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. I don't see much on offer in the LOCKED clause, although the online help suggests that STATUS() will return the user number of the lock it ran into. Can't understand its output... I have a very short program that displays STATUS(), opens the file and displays STATUS() then does a READU against an item I purposefully have locked on another session and I display STATUS() a third time. What do you suppose its giving me, and what can I do with it? 1 STATUS = 0 <-- beginning of program 2 STATUS = 1 <-- after the open 3 STATUS = 197613 <-- this is what it gives me after the READU against a locked item What I want to do is determine who/what has the lock, tell the user, I also want to be able to carry on under my own conditions when ud 46 flag is set which will by default allow edits to items I've locked against my own session. Which is too loose -- I want to check to make sure I'm in the exact right condition to do that and I'm not sure how I can (by seeing what is holding the lock) but ... does anyone know how to get ANY information out of a lock? Susan --- 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/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
Susan, I think what you're looking for is LIST.READU and / or LIST.READU DETAIL. HTH Mark > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Susan Joslyn > Sent: Thursday, April 14, 2005 7:33 AM > To: u2-users@listserver.u2ug.org > Subject: [U2] Locks, releases and STATU() (oh my) > > What I want to do is determine who/what has the lock, tell > the user, I also > want to be able to carry on under my own conditions when ud > 46 flag is set > which will by default allow edits to items I've locked against my own > session. Which is too loose -- I want to check to make sure > I'm in the > exact right condition to do that and I'm not sure how I can > (by seeing what > is holding the lock) but ... does anyone know how to get ANY > information out > of a lock? > > Susan --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
Hi Susan. You're in UD and I'm coming from a UV system so your mileage may vary. LIST.LOCKS is just a semaphore table, not an actual listing of record locks. The LOCK command is used for setting the entries in that table. Not seeing your code snippet, I offer this in an attempt to present my knowledge on this subject: OPEN 'filename' TO FILE.HANDLE ELSE GOTO Z999.EXIT KEY = 'key.value' READU DATA.RCD FROM FILE.HANDLE, KEY LOCKED PRINT 'PROCESS ID ':STATUS():' HAS ':KEY:' LOCKED. ABORTING.' GOTO Z999.EXIT END THEN PRINT 'DATA RECORD FOUND AND LOCKED.' END ELSE PRINT 'NEW DATA RECORD. KEY LOCKED.' END DATA.RCD<-1>='New Field Added' WRITE DATA.RCD ON FILE.HANDLE, KEY Z999.EXIT: END You can then use LISTU to find the process id in the USER NO column and the user login id in the USER NAME column for that process. For LIST.LOCKS, I use that to help me keep track of what PHANTOMS are running. In the phantom program I use something similar to: LOCK.ID = 15 LOCK LOCK.ID THEN PRINT "PHANTOM STARTED AT ":TIMEDATE() END ELSE PRINT "PHANTOM IS ALREADY RUNNING." GOTO Z999.EXIT END * DO STUFF HERE. ... UNLOCK LOCK.ID Z999.EXIT: PRINT "PROCESS ENDED AT ":TIMEDATE() END This will give me an entry in &PH& each time the phantom starts and stops. The number 15 is just a number I picked out the air to be associated with this specific phantom. When I LIST.LOCKS, I'll see my process ID, unless I'm in the Administrators group, then I'll just see a zero in that "slot". If the phantom dies, for any reason, that session closes and releases the lock. If the phantom shuts down normally, it also releases that lock. Hope that helps. Bob W > -Original Message- > From: [EMAIL PROTECTED] [mailto:owner-u2- > [EMAIL PROTECTED] On Behalf Of Susan Joslyn > Sent: Thursday, April 14, 2005 8:33 AM > To: u2-users@listserver.u2ug.org > Subject: [U2] Locks, releases and STATU() (oh my) > > Hello wizards, > > I've read what I can find on the subject, but I'm not finding what I need. > As usual, anyone who knows where the info is, I would not be the least bit > offended if you just point. Or if you know off-hand ... > > (Presently grappling with Unidata): > > When I hit a lock with a: > READU this FROM that,ID LOCKED locked clause ELSE whatever > > LIST.LOCKS from TCL has always been worse than useless for me. For > example > at this exact moment I'm holding locks on 3 sessions, yet if I run > LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. > > I don't see much on offer in the LOCKED clause, although the online help > suggests that STATUS() will return the user number of the lock it ran > into. > Can't understand its output... I have a very short program that displays > STATUS(), opens the file and displays STATUS() then does a READU against > an > item I purposefully have locked on another session and I display STATUS() > a > third time. What do you suppose its giving me, and what can I do with it? > > 1 STATUS = 0 <-- beginning of program > 2 STATUS = 1 <-- after the open > 3 STATUS = 197613 <-- this is what it gives me after the READU against a > locked item > > What I want to do is determine who/what has the lock, tell the user, I > also > want to be able to carry on under my own conditions when ud 46 flag is set > which will by default allow edits to items I've locked against my own > session. Which is too loose -- I want to check to make sure I'm in the > exact right condition to do that and I'm not sure how I can (by seeing > what > is holding the lock) but ... does anyone know how to get ANY information > out > of a lock? > > Susan > --- > 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/
Re: [U2] Locks, releases and STATU() (oh my)
Susan, Try LIST.READU. This will list the readu locks. LIST.LOCKS lists the semaphore locks. The result from the STATUS() should tell you who has the record locked. Translating that into an actual usr can be tricky as this may be the process id (?). You should see the results from STATUS() in the results from LIST.READU. Rich Sammartino At 11:32 AM 4/14/2005 -0400, you wrote: Hello wizards, I've read what I can find on the subject, but I'm not finding what I need. As usual, anyone who knows where the info is, I would not be the least bit offended if you just point. Or if you know off-hand ... (Presently grappling with Unidata): When I hit a lock with a: READU this FROM that,ID LOCKED locked clause ELSE whatever LIST.LOCKS from TCL has always been worse than useless for me. For example at this exact moment I'm holding locks on 3 sessions, yet if I run LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. I don't see much on offer in the LOCKED clause, although the online help suggests that STATUS() will return the user number of the lock it ran into. Can't understand its output... I have a very short program that displays STATUS(), opens the file and displays STATUS() then does a READU against an item I purposefully have locked on another session and I display STATUS() a third time. What do you suppose its giving me, and what can I do with it? 1 STATUS = 0 <-- beginning of program 2 STATUS = 1 <-- after the open 3 STATUS = 197613 <-- this is what it gives me after the READU against a locked item What I want to do is determine who/what has the lock, tell the user, I also want to be able to carry on under my own conditions when ud 46 flag is set which will by default allow edits to items I've locked against my own session. Which is too loose -- I want to check to make sure I'm in the exact right condition to do that and I'm not sure how I can (by seeing what is holding the lock) but ... does anyone know how to get ANY information out of a lock? Susan --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ Richard Sammartino Systems Analyst Information Technology School District of Philadelphia 734 Schuylkill Avenue Philadelphia, PA 19146-2397 Phone: (215) 875-4734 Fax: (215) 893-4243 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
other resources include: LIST.QUEUE and related GETQUEUE() UniBasic function - both show users queued up for a lock (those users would not be using the LOCKED clause). LIST.READU (noted) and GETREADU() function. Don't forget the DETAIL keyword on LIST.READU and LIST.QUEUE to show full data - not truncated to fit in 80 column display. Wally Terhune Manager - U2 Advanced Technical Services IBM Information Management Solutions Tel: 303.294.4866 Fax: 303.294.4832 [EMAIL PROTECTED] www.ibm.com/software/data/u2/support - Open, Query, Update, Search - Online! "Mike Randall" <[EMAIL PROTECTED] cast.net> To Sent by: [EMAIL PROTECTED] cc stserver.u2ug.org Subject RE: [U2] Locks, releases and 04/14/2005 09:47 STATU() (oh my) AM Please respond to u2-users Think LIST.READU is what you are looking for. LIST.LOCKS only displays the 64 semaphore locks which I don't think are too common anymore. Trick with LIST.READU was equating the file number to the proper data file if you were doing it programmatically. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn Sent: Thursday, April 14, 2005 10:33 AM To: u2-users@listserver.u2ug.org Subject: [U2] Locks, releases and STATU() (oh my) Hello wizards, I've read what I can find on the subject, but I'm not finding what I need. As usual, anyone who knows where the info is, I would not be the least bit offended if you just point. Or if you know off-hand ... (Presently grappling with Unidata): When I hit a lock with a: READU this FROM that,ID LOCKED locked clause ELSE whatever LIST.LOCKS from TCL has always been worse than useless for me. For example at this exact moment I'm holding locks on 3 sessions, yet if I run LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. I don't see much on offer in the LOCKED clause, although the online help suggests that STATUS() will return the user number of the lock it ran into. Can't understand its output... I have a very short program that displays STATUS(), opens the file and displays STATUS() then does a READU against an item I purposefully have locked on another session and I display STATUS() a third time. What do you suppose its giving me, and what can I do with it? 1 STATUS = 0 <-- beginning of program 2 STATUS = 1 <-- after the open 3 STATUS = 197613 <-- this is what it gives me after the READU against a locked item What I want to do is determine who/what has the lock, tell the user, I also want to be able to carry on under my own conditions when ud 46 flag is set which will by default allow edits to items I've locked against my own session. Which is too loose -- I want to check to make sure I'm in the exact right condition to do that and I'm not sure how I can (by seeing what is holding the lock) but ... does anyone know how to get ANY information out of a lock? Susan --- 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/ [demime 1.01d removed an attachment of type image/gif which had a name of graycol.gif] [demime 1.01d removed an attachment of type image/gif which had a name of pic05147.gif] [demime 1.01d removed an attachment of type image/gif which had a name of ecblank.gif] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
On Universe LIST.LOCKS shows task locks (i.e. LOCK 5 in UVBASIC )- I have to use LIST.READU EVERY to get readu locks. Does UniData have a LIST.READU command? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn Sent: Thursday, April 14, 2005 10:33 AM To: u2-users@listserver.u2ug.org Subject: [U2] Locks, releases and STATU() (oh my) Hello wizards, I've read what I can find on the subject, but I'm not finding what I need. As usual, anyone who knows where the info is, I would not be the least bit offended if you just point. Or if you know off-hand ... (Presently grappling with Unidata): When I hit a lock with a: READU this FROM that,ID LOCKED locked clause ELSE whatever LIST.LOCKS from TCL has always been worse than useless for me. For example at this exact moment I'm holding locks on 3 sessions, yet if I run LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. I don't see much on offer in the LOCKED clause, although the online help suggests that STATUS() will return the user number of the lock it ran into. Can't understand its output... I have a very short program that displays STATUS(), opens the file and displays STATUS() then does a READU against an item I purposefully have locked on another session and I display STATUS() a third time. What do you suppose its giving me, and what can I do with it? 1 STATUS = 0 <-- beginning of program 2 STATUS = 1 <-- after the open 3 STATUS = 197613 <-- this is what it gives me after the READU against a locked item What I want to do is determine who/what has the lock, tell the user, I also want to be able to carry on under my own conditions when ud 46 flag is set which will by default allow edits to items I've locked against my own session. Which is too loose -- I want to check to make sure I'm in the exact right condition to do that and I'm not sure how I can (by seeing what is holding the lock) but ... does anyone know how to get ANY information out of a lock? Susan --- 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/
RE: [U2] Locks, releases and STATU() (oh my)
Try LIST.READU instead. LIST.LOCKS lists the semaphore locks, LIST.READU lists file and record locks. Larry Hiscock Western Computer Services -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn Sent: Thursday, April 14, 2005 8:33 AM To: u2-users@listserver.u2ug.org Subject: [U2] Locks, releases and STATU() (oh my) Hello wizards, I've read what I can find on the subject, but I'm not finding what I need. As usual, anyone who knows where the info is, I would not be the least bit offended if you just point. Or if you know off-hand ... (Presently grappling with Unidata): When I hit a lock with a: READU this FROM that,ID LOCKED locked clause ELSE whatever LIST.LOCKS from TCL has always been worse than useless for me. For example at this exact moment I'm holding locks on 3 sessions, yet if I run LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. I don't see much on offer in the LOCKED clause, although the online help suggests that STATUS() will return the user number of the lock it ran into. Can't understand its output... I have a very short program that displays STATUS(), opens the file and displays STATUS() then does a READU against an item I purposefully have locked on another session and I display STATUS() a third time. What do you suppose its giving me, and what can I do with it? 1 STATUS = 0 <-- beginning of program 2 STATUS = 1 <-- after the open 3 STATUS = 197613 <-- this is what it gives me after the READU against a locked item What I want to do is determine who/what has the lock, tell the user, I also want to be able to carry on under my own conditions when ud 46 flag is set which will by default allow edits to items I've locked against my own session. Which is too loose -- I want to check to make sure I'm in the exact right condition to do that and I'm not sure how I can (by seeing what is holding the lock) but ... does anyone know how to get ANY information out of a lock? Susan --- 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/
RE: [U2] Locks, releases and STATU() (oh my)
The 197613 is the ID of the user session. The trick is to translate this to a user ID. SB+ appears to be doing this with the SB.DISP.LOCK routine, though I'm not certain how they're doing that translation. Oh, here's a thought. From BASIC, EXECUTE a LIST.READU, capture the output, and then trim each line of the response. Once a line is trimmed, field out the process ID in the third position; if it's the process ID returned by STATUS() then get the port number from the first position. You could then use that to read the $PASSport record which will tell you who is logged in on that port (in <7>) and a whole bunch of other stuff. -Kevin [EMAIL PROTECTED] http://www.PrecisOnline.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Randall Sent: Thursday, April 14, 2005 8:48 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Locks, releases and STATU() (oh my) Think LIST.READU is what you are looking for. LIST.LOCKS only displays the 64 semaphore locks which I don't think are too common anymore. Trick with LIST.READU was equating the file number to the proper data file if you were doing it programmatically. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn Sent: Thursday, April 14, 2005 10:33 AM To: u2-users@listserver.u2ug.org Subject: [U2] Locks, releases and STATU() (oh my) Hello wizards, I've read what I can find on the subject, but I'm not finding what I need. As usual, anyone who knows where the info is, I would not be the least bit offended if you just point. Or if you know off-hand ... (Presently grappling with Unidata): When I hit a lock with a: READU this FROM that,ID LOCKED locked clause ELSE whatever LIST.LOCKS from TCL has always been worse than useless for me. For example at this exact moment I'm holding locks on 3 sessions, yet if I run LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. I don't see much on offer in the LOCKED clause, although the online help suggests that STATUS() will return the user number of the lock it ran into. Can't understand its output... I have a very short program that displays STATUS(), opens the file and displays STATUS() then does a READU against an item I purposefully have locked on another session and I display STATUS() a third time. What do you suppose its giving me, and what can I do with it? 1 STATUS = 0 <-- beginning of program 2 STATUS = 1 <-- after the open 3 STATUS = 197613 <-- this is what it gives me after the READU against a locked item What I want to do is determine who/what has the lock, tell the user, I also want to be able to carry on under my own conditions when ud 46 flag is set which will by default allow edits to items I've locked against my own session. Which is too loose -- I want to check to make sure I'm in the exact right condition to do that and I'm not sure how I can (by seeing what is holding the lock) but ... does anyone know how to get ANY information out of a lock? Susan --- 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/ -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 4/14/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 4/14/2005 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Locks, releases and STATU() (oh my)
Think LIST.READU is what you are looking for. LIST.LOCKS only displays the 64 semaphore locks which I don't think are too common anymore. Trick with LIST.READU was equating the file number to the proper data file if you were doing it programmatically. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn Sent: Thursday, April 14, 2005 10:33 AM To: u2-users@listserver.u2ug.org Subject: [U2] Locks, releases and STATU() (oh my) Hello wizards, I've read what I can find on the subject, but I'm not finding what I need. As usual, anyone who knows where the info is, I would not be the least bit offended if you just point. Or if you know off-hand ... (Presently grappling with Unidata): When I hit a lock with a: READU this FROM that,ID LOCKED locked clause ELSE whatever LIST.LOCKS from TCL has always been worse than useless for me. For example at this exact moment I'm holding locks on 3 sessions, yet if I run LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. I don't see much on offer in the LOCKED clause, although the online help suggests that STATUS() will return the user number of the lock it ran into. Can't understand its output... I have a very short program that displays STATUS(), opens the file and displays STATUS() then does a READU against an item I purposefully have locked on another session and I display STATUS() a third time. What do you suppose its giving me, and what can I do with it? 1 STATUS = 0 <-- beginning of program 2 STATUS = 1 <-- after the open 3 STATUS = 197613 <-- this is what it gives me after the READU against a locked item What I want to do is determine who/what has the lock, tell the user, I also want to be able to carry on under my own conditions when ud 46 flag is set which will by default allow edits to items I've locked against my own session. Which is too loose -- I want to check to make sure I'm in the exact right condition to do that and I'm not sure how I can (by seeing what is holding the lock) but ... does anyone know how to get ANY information out of a lock? Susan --- 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/
[U2] Locks, releases and STATU() (oh my)
Hello wizards, I've read what I can find on the subject, but I'm not finding what I need. As usual, anyone who knows where the info is, I would not be the least bit offended if you just point. Or if you know off-hand ... (Presently grappling with Unidata): When I hit a lock with a: READU this FROM that,ID LOCKED locked clause ELSE whatever LIST.LOCKS from TCL has always been worse than useless for me. For example at this exact moment I'm holding locks on 3 sessions, yet if I run LIST.LOCKS on a 4th session it displays ABSOLUTELY NOTHING. I don't see much on offer in the LOCKED clause, although the online help suggests that STATUS() will return the user number of the lock it ran into. Can't understand its output... I have a very short program that displays STATUS(), opens the file and displays STATUS() then does a READU against an item I purposefully have locked on another session and I display STATUS() a third time. What do you suppose its giving me, and what can I do with it? 1 STATUS = 0 <-- beginning of program 2 STATUS = 1 <-- after the open 3 STATUS = 197613 <-- this is what it gives me after the READU against a locked item What I want to do is determine who/what has the lock, tell the user, I also want to be able to carry on under my own conditions when ud 46 flag is set which will by default allow edits to items I've locked against my own session. Which is too loose -- I want to check to make sure I'm in the exact right condition to do that and I'm not sure how I can (by seeing what is holding the lock) but ... does anyone know how to get ANY information out of a lock? Susan --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/