Reviewed and updated, October 2020
xcall MIAMEX, MX_SETUSRNAM, usrnam$
MX_SETUSRNAM sets (overrides) the user name.
Normally the user name is retrieved from the operating system when needed. In most cases, that is best. However, there are two cases where it might not be:
• If, for some unfathomable reason you allow all users to login to the operating system with a common user login name, then displaying or retrieving that name in utilities such as SYSTAT (or the ashlog.log) isn't very useful. Usually, the excuse for allowing users to share an operating system login name is that you have a separate login process for the application. If this is the case, then you can now use MX_SETUSRNAM so that the application user name replaces the original operating system login name in SYSTAT and other A-Shell purposes.
• In the case of ATSD: while the login name is usually set to match the login name of the ATE client, in some cases it may be set to the login name of the ATSD service as set in the Services Manager.
Notes
Over-riding the user name does not fool the operating system. It only affects A-Shell routines that would otherwise retrieve or use the login name.
To reset the user name (back to the original), you can XCALL MX_SETUSRNAM with USRNAM$ argument of "".
History
2020 October, A-Shell 6.5.1690: Loosen the license counting rules slightly to allow for a second session from the same workstation when MX_SETUSRNAM had been used to change the user name of the first session.