GETUSN.SBR now supports the parameters compname$ and wts'session, both related to Windows clients. The revised syntax is below, followed by descriptions of the new parameters.
xcall GETUSN, user$ {, machine$ {, ate'user$ {, ate'machine$ {, compname$ {,wts'session}}}}}
compname$ (S,20) [out]
will return 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]
will return 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 1 first.