<?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: Automatic macro variable! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109391#M292134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run (in SASBase): &lt;/P&gt;&lt;P&gt;%put _all_;&lt;/P&gt;&lt;P&gt;you get a list of available macro variables.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;If you run x set;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;you will be sent to a dos-box showing the environment variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;You could apply the mechanism below to any of the environment variables:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;%let username=%sysget(username);&lt;BR /&gt;%put username is: &amp;amp;username;&lt;BR /&gt;%let domainname=%sysget(userdomain);&lt;BR /&gt;%put domain name is: &amp;amp;domainname;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;%put&amp;nbsp; &amp;amp;SYSUSERID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;Good luck.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;Ton&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Dec 2014 09:55:17 GMT</pubDate>
    <dc:creator>TonWiegman</dc:creator>
    <dc:date>2014-12-04T09:55:17Z</dc:date>
    <item>
      <title>Automatic macro variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109387#M292130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In EG,&lt;/P&gt;&lt;P&gt;The automatic macro variable&amp;nbsp;&amp;nbsp; "_CLIENTUSERNAME"&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Extracts user name of the user/client but does not work in base SAS.&lt;/P&gt;&lt;P&gt;Is there an equivalent&amp;nbsp; automatic macro variable in Base SAS that extracts the user name?&lt;/P&gt;&lt;P&gt;Thanks for you attention.&lt;/P&gt;&lt;P&gt;Raghu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2013 16:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109387#M292130</guid>
      <dc:creator>rnmishra</dc:creator>
      <dc:date>2013-06-17T16:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic macro variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109388#M292131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;amp;SYSUSERID is the closest.&lt;/P&gt;&lt;P&gt;Depending on your host OS, this information could be available thru OS commands/environment variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2013 16:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109388#M292131</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-06-17T16:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic macro variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109389#M292132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you looking for something like &lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;amp;sysuserid&lt;/SPAN&gt; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2013 16:42:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109389#M292132</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2013-06-17T16:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic macro variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109390#M292133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to extract the user name not the user id.&lt;/P&gt;&lt;P&gt;Exactly what you get on EG when you run "&amp;amp;_CLIENTUSERNAME" .&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2013 16:47:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109390#M292133</guid>
      <dc:creator>rnmishra</dc:creator>
      <dc:date>2013-06-17T16:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic macro variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109391#M292134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run (in SASBase): &lt;/P&gt;&lt;P&gt;%put _all_;&lt;/P&gt;&lt;P&gt;you get a list of available macro variables.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;If you run x set;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;you will be sent to a dos-box showing the environment variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;You could apply the mechanism below to any of the environment variables:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;%let username=%sysget(username);&lt;BR /&gt;%put username is: &amp;amp;username;&lt;BR /&gt;%let domainname=%sysget(userdomain);&lt;BR /&gt;%put domain name is: &amp;amp;domainname;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;%put&amp;nbsp; &amp;amp;SYSUSERID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;Good luck.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;Ton&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2014 09:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109391#M292134</guid>
      <dc:creator>TonWiegman</dc:creator>
      <dc:date>2014-12-04T09:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic macro variable!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109392#M292135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its really dependant on your setup.&amp;nbsp; If you have SAS locally installed then sysuserid will return the username it gets, probably Windows user login (I can't test this).&amp;nbsp; If you have it on a virtual system then it may be the login information for the virtual system.&amp;nbsp; We have ours on Citrix and that return the user information which is setup in the initiation files.&lt;/P&gt;&lt;P&gt;Depending on your setup and what you want to do, you would need to talk to your IT Helpdesk.&amp;nbsp; Principally, you need to be careful what you are doing with the information, but also your IT will be the ones who deal with login information. &lt;/P&gt;&lt;P&gt;If its just a matter of you want in your program and audit of who ran a program, then just setup a small dataset somewhere with user list and take it from there based on the sysuserid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2014 10:10:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variable/m-p/109392#M292135</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-12-04T10:10:15Z</dc:date>
    </item>
  </channel>
</rss>

