Please enable JavaScript to view this site.

A-Shell Reference

Updated July 2013

xcall GETUSN, usrnam$ {, machine$, ate'user$, ate'machine$, compname$, wts'session}

GETUSN returns the current user login name along with, optionally, the other variables listed in the syntax line and the table below. See OPTIONS=EFFUSR and CONDEV for related information.  

Parameters

Parameter

Type

I/O

Notes

usrnam$

String

in/out

The current user login name. If the user name has been overridden (via MX_SETUSRNAM or automatically by an ATSD server when accepting an ATE connection), then usrnam$ will return the over-ridden name. To force it to return the original name (either the server login name or effective user name), set usrnam$ to "!" before calling GETUSN.

machine$

String

out

The console device name.

ate'usrnam$

String

out

The login name of the ATE client.

ate'machine$

String

out

The machine name of the ATE client.

compname$

String

out

The Windows computer name of the client machine. In many cases this will be the same as the machine$ parameter, except it will be just the computer name without any suffixes. It is mainly useful in cases where you are using the -awts command line switch (or OPTIONS=NTTS) where the machine$ parameter may have little relation to the actual client computer name.

wts'session

Num

out

The Windows Terminal Services client session ID, if applicable. Zero indicates the client is not running a WTS connection. Note, however, that internally WTS numbers client sessions from zero, so if you are using the value to reference registry or other information tied to the session #, subtract one first.