Multiple identities: for all of the people you are


When you connect to a SAS environment with SAS Enterprise Guide, are you a single, consistent person? Or do you have more identities than Chevy Chase in Fletch?

When you connect to a SAS environment, you can be many people at once:

  • You are logged into your Windows account on your PC
  • You connect to SAS metadata using a metadata identity
  • You connect to a SAS workspace session with a host identity on the workspace server.

If you have a single sign-on configuration, then your identity should be the same across the board. But if not, the accounts used in the various tiers might be different. Here is a simple SAS program that can help you to answer the deep philosophical question: Who am I?

/* for use on Windows and Unix workspace servers */
%let _metauser = %scan(%sysget(METAUSER),1,'@');
/* for use on MVS, Stored Process, and Pooled Workspace servers */
/* %let _metauser = %scan(%sysfunc(getoption(METAUSER)),1,'@'); */
data ids;
  length name $ 16 purpose $ 40;
  label name="Value Name" purpose="Purpose";
  infile datalines dsd;
  input name purpose;
SYSUSERID, SAS session host account
_CLIENTUSERID, Windows user ID in SAS EG
_CLIENTUSERNAME, Windows user name in SAS EG
_METAUSER, SAS metadata user ID
proc sql;
   from work.ids t1
   inner join sashelp.vmacro t2 on ( =;

When you run this program in SAS Enterprise Guide, you'll produce a simple report that shows all of the IDs that make you the special "you" that you are to SAS.

Tags SAS tips

About Author

Chris Hemedinger

Director, SAS User Engagement

+Chris Hemedinger is the Director of SAS User Engagement, which includes our SAS Communities and SAS User Groups. Since 1993, Chris has worked for SAS as an author, a software developer, an R&D manager and a consultant. Inexplicably, Chris is still coasting on the limited fame he earned as an author of SAS For Dummies

Comments are closed.

Back to Top