This is being posted for an associate of ours, I don't have access to the
systems in question.  The problem is that on Universe 9.4, @USERNO returned
a PIB, an R83-style port number unique to the DBMS, like Unidata @UDTNO.
In newer UV releases this returns the PID ( like getpid() ), the process ID
from the OS (Win32).

Can someone tell us how to get USERNO to return a consistent DBMS-unique
port# rather than the OS PID?


There was another inquiry from Kate Stanton about this a couple months ago,
but I didn't see any answer to her inquiry.  Please let me know if this is
the same question and perhaps if there are different answers for
&SAVEDLISTS&, unlock, etc.

Thanks!
Tony
TG@ removethisNebula-RnD.com

------------------------------------------------

>From Kate Stanton on 3/30/2006:


As at UV 10.1.9, IBM, in their wisdom, appears to have implemented what
could
be called internal and external UV user nos.

Internal user no is what the user thinks its user no is.

External user no is what the system thinks its user no is.

Apparently, this fixes the problem that Telnet users could sometimes have a
negative user no, so look like a phantom.  Note: SYSTEM(25) returns 1 for
phantoms, 0 for non-phantoms.


The following use (or give back) the internal user no:

WHO
BASIC @USERNO, @USER.NO
BASIC !TIMDAT subroutine
Default &SAVEDLISTS& record ID
Default record ID in &HOLD& for print jobs


The following use (or give back) the external user no:

LISTU
PORT.STATUS
LISTME
LIST.READU
BASIC !GET.USERS subroutine


We have not checked the following:

User no locking a record, from STATUS() in LOCKED after READU
ASSIGN error message:  device assigned to User Number nnn
MASTER {LOCKS|BREAK|OFF} user.no
MESSAGE userno ...
UNLOCK [NODE node] [USER user.number] ....
uvdlockd {[-t time] ...|[-v userno]
Default ID on &SAVEDLISTS& file

There may well be other places - we looked in manuals for user no and user
number, but it (what?) is also called terminal no/number, and port
#/no/number
at times.


Following is from what MBS got back from IBM.  If anyone knows how to code
this, we should be grateful!


So now your customer must use a different way to calculate the phantom user
number on Windows systems. The shared memory key for a particular user
includes the unique user number. To retrieve the user number for a phantom,
perform the following steps:

1. Use the 'shrdump' command to capture the list of UniVerse shared memory
segments 2. Find the row for the pid of the phantom 3. Extract the last 4
digits of the shared memory key. For a key of acebefd3, extract efd3.

4. Convert efd3 from hex to decimal (i.e. 61395) 5. Subtract the converted
number from 65536. Then multiply result by -1 The result will be the user
number of the phantom process.

Please note: April 1st is not until tomorrow - I admit, that was my first
thought!

Kate Stanton
Walstan Systems Ltd
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to