First part of @station (AREV Specific)
At 21 JUL 2003 07:31:58PM ps wing wrote:
Does anyone know what the first part of @station represents?
Can not see it in the NLM_STATS display.
At 21 JUL 2003 11:07PM Richard Hunt wrote:
Well… my "Station ID" is 132*WINBOOK.
The "132" is a next available number and the "WINBOOK" is the computer's name.
I guess the "132" part is to be sure to "unique" the "Station ID" when having more than one "AREV" going on the same machine.
At 21 JUL 2003 11:31PM ps wing wrote:
Okay, thanks.
Its just that we are trying to return the network login id using RTP57A and @STATION but as Citrix duplicates the second part of @STATION and the first part is not known by the NLM we cant return the network login name.
At 22 JUL 2003 05:19AM Cameron Christie wrote:
Easy way is to download Steve Smith's vintage utility NOVUSER (see www.state-of-the-art.com.au). I've only ever seen this return incorrect results if the underlying bindery or NDS gets out of synch (in which case you've got bigger problems!
![]()
As you're using the NLM the following snippet might also be of use (FWIW it seems to work just fine over Citrix.) It's coded for a 12-character station ID, but that can be changed easily enough.
NovellName=UNKNOWN'
Station=@Station-1,'B*'
CheckLength=12
If Len(Station)=CheckLength Then
Push.Select(PS1,PS2,PS3,PS4)Open 'SESSIONS' To hSessions ThenClearselectSelect hSessionsDone=0LoopReadnext Id Else Done=1Until DoneRead Row from hSessions,Id ThenIf Row9,CheckLength=Station ThenNovellName=Row1,'.'1,\0D\EndEndUntil NovellName # 'UNKNOWN'RepeatClearselectEndPop.Select(PS1,PS2,PS3,PS4)End
If the SESSIONS table isn't already visible, just have the code attach to the NLM_STATS_VOLUME at the top of the program.
Hope this helps,
Cameron
At 22 JUL 2003 11:59AM Victor Engel wrote:
It is the session instance number. It is maintained in a file called AREVPID.DAT located in the same directory as AREV.EXE. It was created in version 2.1 (I think) to accommodate the amazing new feature of Windows 3.1 of being able to run multiple sessions simultaneously. If this were done and @station was the same on both instances, locking was not handled properly.
At 22 JUL 2003 04:03PM ps wing wrote:
Thanks, I downloaded Steve Smiths $lanuser and works okay so far, but have to test it under Citrix and muliple sessions.
I could not find this SESSIONS table nor the NLM_STATS_VOLUME you mentioined.
Yep, I figured AREVPID.DAT had something to do with @STATION, this is the file which, if left locked, stops other users from logging in!
At 22 JUL 2003 10:06PM S Smith wrote:
You can also make Netware servers to assign the login username to an environment variable during server login script execution. Obtaining the USERNAME variable from the DOS environment is less likely to fail.
Steve
At 23 JUL 2003 05:17AM Cameron Christie wrote:
The end of the code fragment I DIDN'T post does precisely that! Even us kilt-loving Scots know that you'll never go wrong with belt AND braces (although we draw the line at dinky propellor hats!
![]()
The "NLM_STATS_VOLUME" is actually a VOC pointer, as follows :
line 1 :- VOLUME
line 2 :- NLM_STATS_BFS
This might be named differently in your system - have a look to see what gets loaded when you run NLM_STATS itself.
At 31 JUL 2003 12:12AM ps wing wrote:
I just used $LANUSER from www.state-of-the-art.com.au, thanks Steve!
We dont need @STATION anymore.
At 31 JUL 2003 05:31AM Steve Smith wrote:
No probs.