<?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: How to assign script's own path to a variable? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-script-s-own-location-path-to-a-variable/m-p/746355#M234123</link>
    <description>&lt;P&gt;Meaning:&lt;/P&gt;&lt;P&gt;I create a script, "example.sas"&lt;/P&gt;&lt;P&gt;I open that script in EGuide&lt;/P&gt;&lt;P&gt;I run the script, and in that script, the path where "example.sas" is assigned to a variable&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jun 2021 19:08:33 GMT</pubDate>
    <dc:creator>dwhalen</dc:creator>
    <dc:date>2021-06-07T19:08:33Z</dc:date>
    <item>
      <title>How to assign script's own location path to a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-script-s-own-location-path-to-a-variable/m-p/746346#M234118</link>
      <description>&lt;P&gt;How can I get the path of a script's own location (where the .sas file is saved), and assign that path to a variable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Python equivalent would be:&lt;/P&gt;&lt;P&gt;import os&lt;BR /&gt;path = os.path.dirname(__file__)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using EGuide on SAS 9.04&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 19:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-script-s-own-location-path-to-a-variable/m-p/746346#M234118</guid>
      <dc:creator>dwhalen</dc:creator>
      <dc:date>2021-06-07T19:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign script's own path to a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-script-s-own-location-path-to-a-variable/m-p/746352#M234121</link>
      <description>&lt;P&gt;With EG, "path" can mean a lot of things:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the path to the directory from which a project file was loaded&lt;/LI&gt;
&lt;LI&gt;the name and location of a node within a project file&lt;/LI&gt;
&lt;LI&gt;the path where a code node is stored externally (if the EG project has a link to it instead of an embedded program)&lt;/LI&gt;
&lt;LI&gt;the path of a file that was %INCLUDEd on the server.&lt;/LI&gt;
&lt;LI&gt;the path of the SAS executable&lt;/LI&gt;
&lt;LI&gt;the path of the EG executable on Windows&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 07 Jun 2021 19:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-script-s-own-location-path-to-a-variable/m-p/746352#M234121</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-07T19:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign script's own path to a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-script-s-own-location-path-to-a-variable/m-p/746355#M234123</link>
      <description>&lt;P&gt;Meaning:&lt;/P&gt;&lt;P&gt;I create a script, "example.sas"&lt;/P&gt;&lt;P&gt;I open that script in EGuide&lt;/P&gt;&lt;P&gt;I run the script, and in that script, the path where "example.sas" is assigned to a variable&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 19:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-script-s-own-location-path-to-a-variable/m-p/746355#M234123</guid>
      <dc:creator>dwhalen</dc:creator>
      <dc:date>2021-06-07T19:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign script's own path to a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-script-s-own-location-path-to-a-variable/m-p/746359#M234126</link>
      <description>&lt;P&gt;Check &lt;A href="https://blogs.sas.com/content/sasdummy/2012/10/09/special-macro-vars-in-eg/" target="_self"&gt;this list of special macro variables in SAS Enterprise Guide&lt;/A&gt;.&amp;nbsp; Check the &lt;A href="https://go.documentation.sas.com/doc/en/egcdc/8.3/egdoccdc/egug/p02zs1txp6sazsn1k2hc621yaqcc.htm#p1us26pvc0emoqn1va187ei4gaer" target="_self"&gt;SAS Enterprise Guide online help&lt;/A&gt; for the latest - captured here for v8.3:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE id="p0c29l82uykh5fn1nhp6fh1lciby" class="xisDoc-table"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-verticalTop" width="30%"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Macro Variable&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TH class="xisDoc-verticalTop"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Description&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_CLIENTAPP&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Name of the client application&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_CLIENTMACHINE&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Client machine node name&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_CLIENTPROCESSFLOWNAME&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Name of the process flow&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_CLIENTPROJECTNAME&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;File name for the project&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_CLIENTPROJECTPATH&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Full path and file name for the project&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_CLIENTTASKFILTER&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Filter that is defined for the task. You can use this macro variable in the titles and footnotes of the task so that the filter information is displayed in the title or footnote of your results.&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_CLIENTTASKLABEL&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Label for the current task. This is the text label that is displayed in the Project pane and the process flow.&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_CLIENTUSERID&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;User ID of the client user&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_CLIENTUSERNAME&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Full user name, if that information is available&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_CLIENTVERSION&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Application version, including build number&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_SASHOSTNAME&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Server node name (IP address, DNS name, or DCOM name)&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_SASPROGRAMFILE&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Full path and file name of the SAS program that is currently being run. This macro variable is available only for SAS program files that are saved on the same server on which your SAS Enterprise Guide code is being run.&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-forScope" scope="row"&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;_SASSERVERNAME&lt;/FONT&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;FONT size="2"&gt;Name of the logical server&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Mon, 07 Jun 2021 19:19:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-script-s-own-location-path-to-a-variable/m-p/746359#M234126</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-06-07T19:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign script's own path to a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-script-s-own-location-path-to-a-variable/m-p/746370#M234131</link>
      <description>SAS already contains these values in macro variables and you can reference them in your code by using &amp;amp;variableName.&lt;BR /&gt;&lt;BR /&gt;Here's a quick intro for you: &lt;A href="https://stats.idre.ucla.edu/sas/seminars/sas-macros-introduction/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/seminars/sas-macros-introduction/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Jun 2021 19:58:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-script-s-own-location-path-to-a-variable/m-p/746370#M234131</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-06-07T19:58:58Z</dc:date>
    </item>
  </channel>
</rss>

