Oops, I forgot to mention I'm using Windows. Bill Untitled Page
------------------------------------------------------------------------ ----- Original Message ----- *From:* bl...@shaklee.com *To:* U2 Users List <u2-users@listserver.u2ug.org> *Date:* 1/28/2014 1:12 PM *Subject:* Re: [U2] [UD] Who's locking a record
Here's how we do it: READU MASTER.REC FROM F.CNTRL, 'COM.MASTER' LOCKED UID = STATUS() CMD = '!grep :':UID:': /etc/passwd | cut -d -f5' EXECUTE CMD CAPTURING USER.NAME MSG = 'DIST record - ':DIST.NBR:' is locked by: ':USER.NAME<1> CALL SB.DISP(9,MSG) SLEEP 5 CALL SB.DISP(9.'') RETURN END ELSE RELEASE F.CNTRL, 'COM.MASTER' STOP END -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett Sent: Tuesday, January 28, 2014 12:18 PM To: U2 Mail List Subject: [U2] [UD] Who's locking a record In UniData, if you do a READU you can find out the User ID who has the record locked by using the STATUS() function; this returns the 'UID' value. Here's a list of users: 3 Dev (0)-> lu Licensed(UDT+CP)/Effective Udt Sql iPhtm Pooled Total ( 24 + 1 ) / 25 1 0 0 0 1 UDTNO USRNBR UID USRNAME USRTYPE TTY IP-ADDRESS TIME DATE 1 2488 197612 AsiAdmin phantom pts/1 Console 10:42:32 Jan 15 2014 2 3920 197610 JohnSmith udt pts/2 192.168.1.52 08:15:33 Jan 28 2014 3 180 197608 udcsuser udcs pts/3 udcs 09:22:57 Jan 28 2014 4 3840 197608 udcsuser udcs pts/4 udcs 09:23:08 Jan 28 2014 Now, if John Smith goes to read and lock a record that is locked by port#3, how can I figure out which port# actually has the record locked, since the UniData GETUSER() function only returns the UID, and that user, because it is a UniObjects user, is connected on more than one port#? I have a file managed at login that keeps track of the PORT#s and the associated users assigned by our application. I want our logging to report that a record lock by user so-and-so on port {n} is already in place. Thanks. Bill _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users