Microsoft KB Archive/96346

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5x, 2.6x
 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6x

-

SUMMARY
The SYS(0) function is used to return a character string of the machine number and machine name when you are using FoxPro/LAN version 2.0 for MS-DOS or FoxPro version 2.5. NOTE: In order for this function to work, a machine number and name must first be assigned by the network software.

MORE INFORMATION
By setting an MS-DOS environment variable called USER, a machine name can be returned on most networks. For example, place the following line in the AUTOEXEC.BAT file: 

  SET USER=JOHNDOE SYS(0) will then return the name JOHNDOE.

On a Novell network, place the following line in the login script:    MACHINE=&quot;%LOGIN_NAME&quot; SYS(0) will return the user's Novell login name. In this example, it is important that LOGIN_NAME be placed in all caps.

To return both the user's login name and the station number on a Novell network, add the following line to the login script:    MACHINE=&quot;%LOGIN_NAME %STATION&quot; Additional query words: VFoxWin 3.00 FoxDos FoxWin 2.50 2.50a 2.50b 2.60 2.60a User Login Novell novel

Keywords         : FxnetworkNetware Version          : 2.5x 2.6x 3.00 | 2.00 2.5x 2.6x Platform         : MS-DOS WINDOWS Issue type       :
 * }