<?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 How to find location of my sas program in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-location-of-my-sas-program/m-p/324360#M72004</link>
    <description>&lt;P&gt;I am running sas 9.4 on grid platform. I want to get the value of the path of my sas program automatically in sas. I use the below code but it gives me the sas workspace location and not my user directory where my program is saved. Any ideas?&lt;/P&gt;
&lt;P&gt;%put The current program is %sysfunc(getoption(sysin));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/gridwork/userid/SASGSUB-2017-01-12_13.05.07.758_abc/abc.sas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;insted of this I want path of my directory where abc.sas is actually saved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jan 2017 18:10:58 GMT</pubDate>
    <dc:creator>SP_SAS</dc:creator>
    <dc:date>2017-01-12T18:10:58Z</dc:date>
    <item>
      <title>How to find location of my sas program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-location-of-my-sas-program/m-p/324360#M72004</link>
      <description>&lt;P&gt;I am running sas 9.4 on grid platform. I want to get the value of the path of my sas program automatically in sas. I use the below code but it gives me the sas workspace location and not my user directory where my program is saved. Any ideas?&lt;/P&gt;
&lt;P&gt;%put The current program is %sysfunc(getoption(sysin));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/gridwork/userid/SASGSUB-2017-01-12_13.05.07.758_abc/abc.sas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;insted of this I want path of my directory where abc.sas is actually saved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 18:10:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-location-of-my-sas-program/m-p/324360#M72004</guid>
      <dc:creator>SP_SAS</dc:creator>
      <dc:date>2017-01-12T18:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to find location of my sas program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-location-of-my-sas-program/m-p/324364#M72006</link>
      <description>&lt;P&gt;This may work:&lt;/P&gt;
&lt;P&gt;%sysget(SAS_EXECFILEPATH)&lt;/P&gt;
&lt;P&gt;It is the result of a macro function so could be used as:&lt;/P&gt;
&lt;P&gt;title "Program name: %sysget(SAS_EXECFILEPATH)";&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;%let File = %sysget(SAS_EXECFILEPATH);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It returns the path and name &lt;STRONG&gt;after&lt;/STRONG&gt; a file is saved in base SAS. I don't know if it will work in a grid environment.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 18:21:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-location-of-my-sas-program/m-p/324364#M72006</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-01-12T18:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to find location of my sas program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-location-of-my-sas-program/m-p/623426#M183542</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;I think SAS_EXECFILEPATH is only for Windows and the Enhanced Editor.&amp;nbsp; And, also for interactive mode.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/28953"&gt;@SP_SAS&lt;/a&gt;,&amp;nbsp;Did you ever find a solution to this problem?&amp;nbsp; I'm running into your same problem when running on SAS GRID and I'd be very curious if it's possible to obtain the path dynamically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 17:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-location-of-my-sas-program/m-p/623426#M183542</guid>
      <dc:creator>SmithCJGVSU</dc:creator>
      <dc:date>2020-02-09T17:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to find location of my sas program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-location-of-my-sas-program/m-p/623436#M183548</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19995"&gt;@SmithCJGVSU&lt;/a&gt;&amp;nbsp;- Why do you think a new SAS server session will somehow know where your SAS programs are stored if you haven't identified any of these programs to SAS first? A brand-new SAS session will only know the location of where it was started from and nothing about what programs you want it to run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I find it useful to set up a macro variable containing the folder location of the required SAS application in a program controlling that application.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 19:23:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-location-of-my-sas-program/m-p/623436#M183548</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-02-09T19:23:59Z</dc:date>
    </item>
  </channel>
</rss>

