<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Logged on User in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Logged-on-User/m-p/31766#M4194</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks great, thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jul 2011 06:15:28 GMT</pubDate>
    <dc:creator>Seer</dc:creator>
    <dc:date>2011-07-15T06:15:28Z</dc:date>
    <item>
      <title>Logged on User</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Logged-on-User/m-p/31764#M4192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to identify the user name of the current user from within a Stored Process.&amp;nbsp; Is there a way of doing this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 20:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Logged-on-User/m-p/31764#M4192</guid>
      <dc:creator>Seer</dc:creator>
      <dc:date>2011-07-14T20:15:31Z</dc:date>
    </item>
    <item>
      <title>Logged on User</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Logged-on-User/m-p/31765#M4193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is &amp;amp;sysuserid what you are looking for?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 02:41:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Logged-on-User/m-p/31765#M4193</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2011-07-15T02:41:53Z</dc:date>
    </item>
    <item>
      <title>Logged on User</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Logged-on-User/m-p/31766#M4194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks great, thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 06:15:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Logged-on-User/m-p/31766#M4194</guid>
      <dc:creator>Seer</dc:creator>
      <dc:date>2011-07-15T06:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Logged on User</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Logged-on-User/m-p/31767#M4195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Seer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a number of macro variables you can choose from to best suit your needs, but the values they have will depend on the way in which the stored process is configured, the configuration of the server it will run on, and the person who has logged in to run it.&amp;nbsp; Generally speaking in a stored process you are probably interested in &amp;amp;_METAUSER or &amp;amp;_METAPERSON which will resolve to the userid and name of the person who logged in to run the stored process.&amp;nbsp; On the other hand &amp;amp;SYSUSERID will be the userid for the SAS process owner which may or not be the person who is running the stored process.&amp;nbsp; To give you some examples, I have the following stored process code which will show me the various identity values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;data test;&lt;BR /&gt;sysuserid="&amp;amp;sysuserid";&lt;BR /&gt;metauser="&amp;amp;_metauser";&lt;BR /&gt;metaperson="&amp;amp;_metaperson";&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I create a stored process with this code and configure it to I run on my "SASApp - Logical Stored Process Server" then I get the following output when it is run:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;sysuserid&amp;nbsp;&amp;nbsp; metauser&amp;nbsp;&amp;nbsp; metaperson&lt;BR /&gt;---------------------------------&lt;BR /&gt;sassrv&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; paul&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Paul Homes&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I then modify it to run on my "SASApp - Logical Workspace Server" I will get the following output when it is run:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;sysuserid&amp;nbsp;&amp;nbsp; metauser&amp;nbsp;&amp;nbsp; metaperson&lt;BR /&gt;---------------------------------&lt;BR /&gt;paul&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; paul&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Paul Homes&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that &amp;amp;SYSUSERID is different.&amp;nbsp; That's because my "SASApp - Logical Workspace Server" is configured to launch and run the underlying SAS process on-demand as the requesting user, but my "SASApp - Logical Stored Process Server" is configured to pre-launch SAS processes with a fixed set of launch credentials (the sassrv account often used to run SAS stored process and pooled workspace servers). This is a common configuration. In some situations it is also possible and/or necessary to configure a standard workspace server to use a specific set of launch credentials too so I wouldn't rely on this behaviour unless you talk to you platform administrator first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest that whilst it may be possible to use &amp;amp;SYSUSERID in some situations you might be better of using &amp;amp;_METAUSER or &amp;amp;_METAPERSON if you want the identity of the person who logged in to the SAS platform to run the stored process.&amp;nbsp; I would only use &amp;amp;SYSUSERID when you want the identity of the account used to run the SAS operating system process regardless of who logged into SAS to run the stored process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is more information on the special _METAUSER and _METAPERSON macro variables in the &lt;EM&gt;SAS® 9.2 Stored Processes: Developer's Guide&lt;/EM&gt; under &lt;EM&gt;Writing a Stored Process&lt;/EM&gt; and &lt;EM&gt;Using Reserved Macro Variables&lt;/EM&gt; (&lt;A href="http://support.sas.com/documentation/cdl/en/stpug/61271/HTML/default/viewer.htm#a003152603.htm" title="http://support.sas.com/documentation/cdl/en/stpug/61271/HTML/default/viewer.htm#a003152603.htm"&gt;http://support.sas.com/documentation/cdl/en/stpug/61271/HTML/default/viewer.htm#a003152603.htm&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;BR /&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jul 2011 04:20:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Logged-on-User/m-p/31767#M4195</guid>
      <dc:creator>PaulHomes</dc:creator>
      <dc:date>2011-07-16T04:20:04Z</dc:date>
    </item>
  </channel>
</rss>

