<?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: Concatenated Variable Name in Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Concatenated-Variable-Name-in-Macro/m-p/576642#M163250</link>
    <description>&lt;P&gt;Has the value in the macro variable been macro quoted?&lt;/P&gt;
&lt;P&gt;Perhaps that is causing the parser to see that as two tokens.&lt;/P&gt;
&lt;P&gt;Try adding %UNQUOTE() function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;_2014_15b=%unquote(&amp;amp;retOrGrad._percent)&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 Jul 2019 15:10:56 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-07-25T15:10:56Z</dc:date>
    <item>
      <title>Concatenated Variable Name in Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenated-Variable-Name-in-Macro/m-p/576633#M163245</link>
      <description>&lt;P&gt;%macro createGradRetRowsSummaryLines(stud_type, cohortYearCount, cohortYearCount2, gradOrRen, retOrGrad, firstTime);&lt;BR /&gt;if cohort=201510 and DisplayColumn="&amp;amp;cohortYearCount2 Year &amp;amp;gradOrRen of &amp;amp;stud_type" then _2014_15b=&amp;amp;retOrGrad._percent; &lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why is Enterprise Guide throwing an error when I use&amp;nbsp;&amp;amp;retOrGrad._percent should it read this as variable || _percent and query the variable name that matches the concatenation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, INPUT, PUT.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 15:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenated-Variable-Name-in-Macro/m-p/576633#M163245</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2019-07-25T15:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenated Variable Name in Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenated-Variable-Name-in-Macro/m-p/576638#M163247</link>
      <description>&lt;P&gt;Please re-run your code with OPTIONS MPRINT; as the first line of the program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show us the full SAS log, not just the error messages. Paste the log into the window that appears when the you click on the {i} icon (do not paste your log directly into your reply)&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 15:04:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenated-Variable-Name-in-Macro/m-p/576638#M163247</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-25T15:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenated Variable Name in Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenated-Variable-Name-in-Macro/m-p/576642#M163250</link>
      <description>&lt;P&gt;Has the value in the macro variable been macro quoted?&lt;/P&gt;
&lt;P&gt;Perhaps that is causing the parser to see that as two tokens.&lt;/P&gt;
&lt;P&gt;Try adding %UNQUOTE() function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;_2014_15b=%unquote(&amp;amp;retOrGrad._percent)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jul 2019 15:10:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenated-Variable-Name-in-Macro/m-p/576642#M163250</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-25T15:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenated Variable Name in Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenated-Variable-Name-in-Macro/m-p/576658#M163260</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/5059"&gt;@DavidPhillips2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;%macro createGradRetRowsSummaryLines(stud_type, cohortYearCount, cohortYearCount2, gradOrRen, retOrGrad, firstTime);&lt;BR /&gt;if cohort=201510 and DisplayColumn="&amp;amp;cohortYearCount2 Year &amp;amp;gradOrRen of &amp;amp;stud_type" then _2014_15b=&amp;amp;retOrGrad._percent; &lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why is Enterprise Guide throwing an error when I use&amp;nbsp;&amp;amp;retOrGrad._percent should it read this as variable || _percent and query the variable name that matches the concatenation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, INPUT, PUT.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You don't even show the code used to call the macro. So we don't see what possible values your macro variable might have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My guess is that something in &amp;amp;retorgrad is not valid in a SAS variable name or the length of the result exceeds 32 characters and is not a valid variable name after the concatenation.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 15:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenated-Variable-Name-in-Macro/m-p/576658#M163260</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-07-25T15:37:29Z</dc:date>
    </item>
  </channel>
</rss>

