Only on Unidata
-----Original Message----- From: Larry Hiscock <[email protected]> To: 'U2 Users List' <[email protected]> Sent: Mon, Apr 30, 2012 3:18 pm Subject: Re: [U2] User ID of a LOCKED record In the LOCKED clause of your READU/MATREADU statement, STATUS() will contain he UID of the user locking the record. The GETREADU() function will return dynamic array of all record locks held by the system, similar to the IST.READU TCL command. e.g.: :LIST.READU UNO UNBR UID UNAME TTY FILENAME INBR DNBR RECORD_ID M TIME ATE 1 21776 200 larry ttyp0 /u/MA.IN 23074 299 187740 X 14:28:47 Apr 0 GETREADU() returns: 1}21776}200}larryh}ttyp0}/u/MA.INFO/CUST.MST}23074}299}187740}X}14:30:58}Apr 0 2012 STATUS() in the LOCKED clause of a READU would return the UID, which is 200 the 3rd element in the array, i.e. array<x,3>). You could loop through the array to find an entry where the UID matches your TATUS() value, and the RECORD_ID (array<x,9>) matches the key you're trying o read. You could also check the file name (array<x,6>) for good measure. nce you've found the right line, array<x,4> contains the user name, and rray<x,5> contains the tty they're logged in on (which may be less than elpful in a telnet/ssh environment). Larry Hiscock estern Computer Services -----Original Message----- rom: [email protected] mailto:[email protected]] On Behalf Of Andy Krause ent: Monday, April 30, 2012 1:55 PM o: U2 Users List ubject: [U2] User ID of a LOCKED record I am trying to notify a user of a locked record so they can ask the person ocking that record to GET OUT. Is there a simple way to retrieve the user ID given the port number in a ASIC program? The only method I have found is to call !GET.USERS and then oop through the USER.INFO param comparing port numbers until I find the ser and pull their user ID from there. Thanks in advance. Andy Krause _______________________________________________ 2-Users mailing list [email protected] ttp://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ 2-Users mailing list [email protected] ttp://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
