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.