CORE
mf_getuser.sas File Reference

Returns &sysuserid in Workspace session, &_secureusername in Stored Process session. More...

Go to the source code of this file.

Detailed Description

Returns &sysuserid in Workspace session, &_secureusername in Stored Process session.

In a workspace session, a user is generally represented by &sysuserid. In a Stored Process session, &sysuserid resolves to a system account (default=sassrv) and instead there are several metadata username variables to choose from (_metauser, _metaperson ,_username, _secureusername). The OS account is represented by _secureusername whilst the metadata account is under _metaperson.

%let user= %mf_getUser();
%put &user;
Parameters
typeMETA returns _metaperson, OS returns _secureusername. Each of these are scanned to remove any extensions (which can happen after a password change).
Returns
sysuserid (if workspace server)
_secureusername or _metaperson (if stored process server)
Version
9.2
Author
Allan Bowe

Definition in file mf_getuser.sas.