<?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 sas program can find the path to itself in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-sas-program-can-find-the-path-to-itself/m-p/449874#M113277</link>
    <description>&lt;P&gt;See this log from Enterprise Guide:&lt;/P&gt;
&lt;PRE&gt;27         %macro grabpathname;
28         %sysget(SAS_EXECFILEPATH)
29         %mend grabpathname;
30         %put %grabpathname;
WARNING: The argument to macro function %SYSGET is not defined as a system variable.
&lt;/PRE&gt;
&lt;P&gt;and this log from a program run with&lt;/P&gt;
&lt;PRE&gt;sas test.sas&lt;/PRE&gt;
&lt;P&gt;on SAS 9.4M5 on AIX:&lt;/P&gt;
&lt;PRE&gt;1          %macro grabpathname;
2          %sysget(SAS_EXECFILEPATH)
3          %mend grabpathname;
4          %put %grabpathname;
WARNING: The argument to macro function %SYSGET is not defined as a system variable.
&lt;/PRE&gt;
&lt;P&gt;So you see this is not reliable.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Mar 2018 08:57:14 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-03-30T08:57:14Z</dc:date>
    <item>
      <title>How sas program can find the path to itself</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-sas-program-can-find-the-path-to-itself/m-p/449866#M113274</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please say how sas program can find the path to itself?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I mean the way on a disk where it is kept.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 08:06:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-sas-program-can-find-the-path-to-itself/m-p/449866#M113274</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-03-30T08:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: How sas program can find the path to itself</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-sas-program-can-find-the-path-to-itself/m-p/449870#M113275</link>
      <description>&lt;P&gt;Depending on your environment (batch or workspace server), look at option sysin (you can get it in SQL from DICTIONARY.OPTIONS), &amp;amp;SYSPROCESSNAME, &amp;amp;_SASPROGRAMFILE&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 08:46:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-sas-program-can-find-the-path-to-itself/m-p/449870#M113275</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-30T08:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: How sas program can find the path to itself</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-sas-program-can-find-the-path-to-itself/m-p/449872#M113276</link>
      <description>Please try below code , it gets the path name. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%macro grabpathname;&lt;BR /&gt; %sysget(SAS_EXECFILEPATH)&lt;BR /&gt;%mend grabpathname;&lt;BR /&gt;%put %grabpathname;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Mar 2018 08:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-sas-program-can-find-the-path-to-itself/m-p/449872#M113276</guid>
      <dc:creator>DR_Majeti</dc:creator>
      <dc:date>2018-03-30T08:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: How sas program can find the path to itself</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-sas-program-can-find-the-path-to-itself/m-p/449874#M113277</link>
      <description>&lt;P&gt;See this log from Enterprise Guide:&lt;/P&gt;
&lt;PRE&gt;27         %macro grabpathname;
28         %sysget(SAS_EXECFILEPATH)
29         %mend grabpathname;
30         %put %grabpathname;
WARNING: The argument to macro function %SYSGET is not defined as a system variable.
&lt;/PRE&gt;
&lt;P&gt;and this log from a program run with&lt;/P&gt;
&lt;PRE&gt;sas test.sas&lt;/PRE&gt;
&lt;P&gt;on SAS 9.4M5 on AIX:&lt;/P&gt;
&lt;PRE&gt;1          %macro grabpathname;
2          %sysget(SAS_EXECFILEPATH)
3          %mend grabpathname;
4          %put %grabpathname;
WARNING: The argument to macro function %SYSGET is not defined as a system variable.
&lt;/PRE&gt;
&lt;P&gt;So you see this is not reliable.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 08:57:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-sas-program-can-find-the-path-to-itself/m-p/449874#M113277</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-30T08:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: How sas program can find the path to itself</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-sas-program-can-find-the-path-to-itself/m-p/449894#M113281</link>
      <description>&lt;P&gt;Actually I have used the code (some points are project-specific):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%global pathtofile pathdir;
%let pathtofile = %qsubstr(%sysget(SAS_EXECFILEPATH), 1, %length(%sysget(SAS_EXECFILEPATH))-%length(%sysget(SAS_EXECFILEname)));
%let code=\code\;
%let pathdir =%qsubstr(&amp;amp;pathtofile,1,%index(&amp;amp;pathtofile,&amp;amp;code));
%put &amp;amp;pathdir;&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Mar 2018 12:07:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-sas-program-can-find-the-path-to-itself/m-p/449894#M113281</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-03-30T12:07:38Z</dc:date>
    </item>
  </channel>
</rss>

