<?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 know the program path when running code in Visual Studio Code SAS extension? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-the-program-path-when-running-code-in-Visual-Studio/m-p/981707#M379180</link>
    <description>&lt;P&gt;Ah, I see. It's working as expected with local files that you open/create in VS Code, but not for "remote" files that you open from the SAS Content folders. Feel free to comment on the issue in GitHub and see if it can be prioritized for a fix.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jan 2026 15:23:10 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2026-01-08T15:23:10Z</dc:date>
    <item>
      <title>How to know the program path when running code in Visual Studio Code SAS extension?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-the-program-path-when-running-code-in-Visual-Studio/m-p/981601#M379150</link>
      <description>&lt;P&gt;In &lt;STRONG&gt;SAS Viya&lt;/STRONG&gt;, when running code in &lt;STRONG&gt;SAS Studio&lt;/STRONG&gt;, the automatic macro variable &lt;CODE&gt;_SASPROGRAMFILE&lt;/CODE&gt; contains the full path (or URI) of the program file. However, when running the same program using the &lt;STRONG&gt;VS Code SAS extension&lt;/STRONG&gt;, &lt;CODE&gt;_SASPROGRAMFILE&lt;/CODE&gt; resolves to the filename only, without the directory path.&lt;/P&gt;&lt;P&gt;Is there a way to determine the &lt;STRONG&gt;full path of the program file&lt;/STRONG&gt; when running from VS Code? Does SAS Viya expose this information through any &lt;STRONG&gt;existing environment variable&lt;/STRONG&gt;, or other macro variable?&lt;BR /&gt;Any hints or recommended approaches?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 03:37:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-the-program-path-when-running-code-in-Visual-Studio/m-p/981601#M379150</guid>
      <dc:creator>Proc_Canada</dc:creator>
      <dc:date>2026-01-07T03:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to know the program path when running code in Visual Studio Code SAS extension?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-the-program-path-when-running-code-in-Visual-Studio/m-p/981634#M379155</link>
      <description>&lt;P&gt;The VS Code extension also adds the _SASPROGRAMFILE macro variable. Example:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;%let _SASPROGRAMFILE = %nrquote(%nrstr(c:\Projects\sas-programs-misc\bird-events.sas));&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you're not seeing that in your case.&amp;nbsp; You can also report issues as needed in the GitHub project:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sassoftware/vscode-sas-extension/issues" target="_blank"&gt;https://github.com/sassoftware/vscode-sas-extension/issues&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 14:17:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-the-program-path-when-running-code-in-Visual-Studio/m-p/981634#M379155</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2026-01-07T14:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to know the program path when running code in Visual Studio Code SAS extension?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-the-program-path-when-running-code-in-Visual-Studio/m-p/981644#M379159</link>
      <description>&lt;P&gt;May I know what version are you using? I am using the newest version and it does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are output of same program file, which has only one statement (%put &amp;amp;=_sasprogramfile;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS Studio output:&lt;/P&gt;&lt;P&gt;_SASPROGRAMFILE=/export/viya/homes/xxxx/Work/test/a.sas&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;%put &amp;amp;=_sasprogramfile;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_SASPROGRAMFILE=\a.sas&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 17:00:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-the-program-path-when-running-code-in-Visual-Studio/m-p/981644#M379159</guid>
      <dc:creator>Proc_Canada</dc:creator>
      <dc:date>2026-01-07T17:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to know the program path when running code in Visual Studio Code SAS extension?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-the-program-path-when-running-code-in-Visual-Studio/m-p/981647#M379160</link>
      <description>&lt;P&gt;The issue has been reported for almost one year and still open.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/sassoftware/vscode-sas-extension/issues/1419" target="_blank"&gt;https://github.com/sassoftware/vscode-sas-extension/issues/1419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 17:09:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-the-program-path-when-running-code-in-Visual-Studio/m-p/981647#M379160</guid>
      <dc:creator>Proc_Canada</dc:creator>
      <dc:date>2026-01-07T17:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to know the program path when running code in Visual Studio Code SAS extension?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-the-program-path-when-running-code-in-Visual-Studio/m-p/981707#M379180</link>
      <description>&lt;P&gt;Ah, I see. It's working as expected with local files that you open/create in VS Code, but not for "remote" files that you open from the SAS Content folders. Feel free to comment on the issue in GitHub and see if it can be prioritized for a fix.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 15:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-the-program-path-when-running-code-in-Visual-Studio/m-p/981707#M379180</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2026-01-08T15:23:10Z</dc:date>
    </item>
  </channel>
</rss>

