<?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: Unable to resolve %let variable in %include statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-let-variable-in-include-statement/m-p/879142#M347323</link>
    <description>&lt;P&gt;Since you used MASKED function %str(), you need to use %unquote() to get rid of it before referring to this macro variable.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%let project_path = %str(E:/Murli/Project);&lt;BR /&gt;%put %str(&amp;amp;project_path);&lt;BR /&gt;%include "&lt;STRONG&gt;%unquote(&lt;/STRONG&gt;&amp;amp;project_path&lt;STRONG&gt;)&lt;/STRONG&gt;/Utils/Macro/connect2mssql.sas"&lt;FONT size="7" color="#FF0000"&gt;&lt;STRONG&gt;&amp;nbsp; ;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 03 Jun 2023 08:45:58 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2023-06-03T08:45:58Z</dc:date>
    <item>
      <title>Unable to resolve %let variable in %include statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-let-variable-in-include-statement/m-p/879141#M347322</link>
      <description>&lt;P&gt;I am unable to resolve the value of %let project_path in %include statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS code:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;%let project_path = %str(E:/Murli/Project);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%put %str(&amp;amp;project_path);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%include "&amp;amp;project_path/Utils/Macro/connect2mssql.sas"&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;log:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ERROR: Cannot open %INCLUDE file CONNECTION.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;812 %include "&amp;amp;project_path/Utils/Macro/connect2mssql.sas"&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2023 07:29:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-let-variable-in-include-statement/m-p/879141#M347322</guid>
      <dc:creator>vijaypratap0195</dc:creator>
      <dc:date>2023-06-03T07:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to resolve %let variable in %include statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-let-variable-in-include-statement/m-p/879142#M347323</link>
      <description>&lt;P&gt;Since you used MASKED function %str(), you need to use %unquote() to get rid of it before referring to this macro variable.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%let project_path = %str(E:/Murli/Project);&lt;BR /&gt;%put %str(&amp;amp;project_path);&lt;BR /&gt;%include "&lt;STRONG&gt;%unquote(&lt;/STRONG&gt;&amp;amp;project_path&lt;STRONG&gt;)&lt;/STRONG&gt;/Utils/Macro/connect2mssql.sas"&lt;FONT size="7" color="#FF0000"&gt;&lt;STRONG&gt;&amp;nbsp; ;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2023 08:45:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-let-variable-in-include-statement/m-p/879142#M347323</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-06-03T08:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to resolve %let variable in %include statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-let-variable-in-include-statement/m-p/879151#M347327</link>
      <description>&lt;P&gt;Works fine for me on Windows without %STR, quoting or unquoting, but you need to use backslashes on Windows instead of forward slashes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let project_path = G:\xxx\xxxx\MillerP;
%put &amp;amp;=project_path;
%include "&amp;amp;project_path\scale_to_100.sas";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2023 11:19:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-resolve-let-variable-in-include-statement/m-p/879151#M347327</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-03T11:19:35Z</dc:date>
    </item>
  </channel>
</rss>

