<?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 Referencing macro variable SAS Programming 1: Essentials lesson 5 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Referencing-macro-variable-SAS-Programming-1-Essentials-lesson-5/m-p/787530#M251646</link>
    <description>&lt;P&gt;I have a question regarding the code in lesson 5. There is a macro variable created but when we reference it in the code, why don't we use the double quotation marks to do so ""?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As in:&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let age=13;&lt;/P&gt;&lt;P&gt;proc print data=pg1.class_birthdate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where age=&lt;STRONG&gt;"&amp;amp;age";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your help with understanding this basics!&lt;/P&gt;</description>
    <pubDate>Tue, 28 Dec 2021 17:30:56 GMT</pubDate>
    <dc:creator>Magdalena56</dc:creator>
    <dc:date>2021-12-28T17:30:56Z</dc:date>
    <item>
      <title>Referencing macro variable SAS Programming 1: Essentials lesson 5</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-macro-variable-SAS-Programming-1-Essentials-lesson-5/m-p/787530#M251646</link>
      <description>&lt;P&gt;I have a question regarding the code in lesson 5. There is a macro variable created but when we reference it in the code, why don't we use the double quotation marks to do so ""?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As in:&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let age=13;&lt;/P&gt;&lt;P&gt;proc print data=pg1.class_birthdate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where age=&lt;STRONG&gt;"&amp;amp;age";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your help with understanding this basics!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 17:30:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-macro-variable-SAS-Programming-1-Essentials-lesson-5/m-p/787530#M251646</guid>
      <dc:creator>Magdalena56</dc:creator>
      <dc:date>2021-12-28T17:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing macro variable SAS Programming 1: Essentials lesson 5</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-macro-variable-SAS-Programming-1-Essentials-lesson-5/m-p/787542#M251654</link>
      <description>&lt;P&gt;The solution has to do with SAS language, rather than macro language.&amp;nbsp; In SAS language, when AGE is a numeric variable this would be correct:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where age = 13;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This would be incorrect:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where age = "13";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So getting back to your question, use of quotes would be incorrect because it would generate an incorrect WHERE statement.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 19:17:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-macro-variable-SAS-Programming-1-Essentials-lesson-5/m-p/787542#M251654</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-12-28T19:17:49Z</dc:date>
    </item>
  </channel>
</rss>

