<?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 Re: Detecting who the Metadata User is in Submitted Code in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Detecting-who-the-Metadata-User-is-in-Submitted-Code/m-p/52882#M5625</link>
    <description>Thanks for the code Chris.  Would it be possible to get the user display name as well as the user ID?</description>
    <pubDate>Fri, 12 Feb 2010 18:41:04 GMT</pubDate>
    <dc:creator>Technolero</dc:creator>
    <dc:date>2010-02-12T18:41:04Z</dc:date>
    <item>
      <title>Detecting who the Metadata User is in Submitted Code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Detecting-who-the-Metadata-User-is-in-Submitted-Code/m-p/52879#M5622</link>
      <description>Is there an analog to the _metauser or _metaname macro variables that are available in Stored Processes that can be referenced in code submitted in EG directly to the current Workspace Server session? When I asked about this several years ago for 9.1.3, I was told that those macro variables would be available in 9.2 across all clients (e.g., EG, AMO, etc.). But I don't see them in EG 4.2.&lt;BR /&gt;
&lt;BR /&gt;
Note that I need to know the identify of the metadata user, not the clientid (which is the id on the PC where EG is running).</description>
      <pubDate>Thu, 04 Feb 2010 19:46:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Detecting-who-the-Metadata-User-is-in-Submitted-Code/m-p/52879#M5622</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2010-02-04T19:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting who the Metadata User is in Submitted Code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Detecting-who-the-Metadata-User-is-in-Submitted-Code/m-p/52880#M5623</link>
      <description>Don,&lt;BR /&gt;
&lt;BR /&gt;
I checked with our internal expert, and here is what he came up with.&lt;BR /&gt;
&lt;BR /&gt;
In a *standard* workspace server, this works:&lt;BR /&gt;
&lt;BR /&gt;
%let username = %scan(%sysget(METAUSER),1,'@');&lt;BR /&gt;
&lt;BR /&gt;
Except on z/OS, where there are no environment variables, and *pooled* workspace servers and stored process servers, which are multi-user in nature:&lt;BR /&gt;
&lt;BR /&gt;
%let username = %scan(%sysfunc(getoption(METAUSER)),1,'@');&lt;BR /&gt;
&lt;BR /&gt;
Note that on Windows servers, the ID you get is not domain-qualified.  That is, you would see "donh", not "HCBI\donh".&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Fri, 05 Feb 2010 14:27:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Detecting-who-the-Metadata-User-is-in-Submitted-Code/m-p/52880#M5623</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2010-02-05T14:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting who the Metadata User is in Submitted Code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Detecting-who-the-Metadata-User-is-in-Submitted-Code/m-p/52881#M5624</link>
      <description>Thanks Chris. That seems to work quite nicely. I plan to package that into a macro that I already have that I use to convert &amp;amp;_metauser into a valid sas name. Once I do that I will post it on sasCommunity.org.</description>
      <pubDate>Fri, 12 Feb 2010 14:18:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Detecting-who-the-Metadata-User-is-in-Submitted-Code/m-p/52881#M5624</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2010-02-12T14:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting who the Metadata User is in Submitted Code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Detecting-who-the-Metadata-User-is-in-Submitted-Code/m-p/52882#M5625</link>
      <description>Thanks for the code Chris.  Would it be possible to get the user display name as well as the user ID?</description>
      <pubDate>Fri, 12 Feb 2010 18:41:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Detecting-who-the-Metadata-User-is-in-Submitted-Code/m-p/52882#M5625</guid>
      <dc:creator>Technolero</dc:creator>
      <dc:date>2010-02-12T18:41:04Z</dc:date>
    </item>
  </channel>
</rss>

