Multiple identities: for all of the people you are

0

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;
datalines;
SYSUSERID, SAS session host account
_CLIENTUSERID, Windows user ID in SAS EG
_CLIENTUSERNAME, Windows user name in SAS EG
_METAUSER, SAS metadata user ID
run;
proc sql;
  select t1.name,
    t2.value,
    t1.purpose
   from work.ids t1
   inner join sashelp.vmacro t2 on (t1.name = t2.name);
quit;

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
Share

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