<?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: macro into a table and a macro variable with sas in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150056#M39560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paige,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've replaced the code as such&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data dico&amp;amp;&amp;amp;pays&amp;amp;l..1 ; &lt;/P&gt;&lt;P&gt;set dico&amp;amp;&amp;amp;pays&amp;amp;l (keep=&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; background-color: #eeeeee;"&gt;varname&lt;/SPAN&gt;); &lt;/P&gt;&lt;P&gt;call symputx('n&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; background-color: #eeeeee;"&gt;varname&lt;/SPAN&gt;'||left(_n_),&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; background-color: #eeeeee;"&gt;varname&lt;/SPAN&gt;); &lt;/P&gt;&lt;P&gt;run ;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&amp;nbsp; &lt;/P&gt;&lt;P&gt;insert into toto SELECT max(nouv_date),"&amp;amp;n&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; background-color: #eeeeee;"&gt;varname&lt;/SPAN&gt;" FROM a&amp;amp;&amp;amp;pays&amp;amp;l.._1 WHERE (&amp;amp;n&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; background-color: #eeeeee;"&gt;varname&lt;/SPAN&gt; ne .); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I got this error (see below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a datetime constant, a missing value, BTRIM, INPUT, PUT, SUBSTRING, USER.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2014 15:50:04 GMT</pubDate>
    <dc:creator>andy_wk</dc:creator>
    <dc:date>2014-06-20T15:50:04Z</dc:date>
    <item>
      <title>macro into a table and a macro variable with sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150051#M39555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;I'm having this macro. The aim is to take the name of variables from the table dicofr and put the rows inside into variable name using a symput.&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;However , something is not working correctly because that variable, &amp;amp;nvarname, is not seen as a variable.&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;This is the content of &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background: #eeeeee;"&gt;dico&amp;amp;&amp;amp;pays&amp;amp;l&lt;/CODE&gt;&lt;/P&gt;&lt;PRE class="lang-sql prettyprint prettyprinted" style="margin: 0 0 10px; padding: 5px; font-size: 14px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #000000; background: #eeeeee;"&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;varname descr &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;var12 aza &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;var55 ghj &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;var74 mcy&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;This is the content of &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background: #eeeeee;"&gt;dico&amp;amp;&amp;amp;pays&amp;amp;l..1&lt;/CODE&gt;&lt;/P&gt;&lt;PRE class="lang-sql prettyprint prettyprinted" style="margin: 0 0 10px; padding: 5px; font-size: 14px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #000000; background: #eeeeee;"&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;varname &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;var12 &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;var55 &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN style="line-height: 1.5em; background-color: transparent;"&gt;var74&lt;/SPAN&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;Below is my code&lt;/P&gt;&lt;PRE class="lang-sql prettyprint prettyprinted" style="margin: 0 0 10px; padding: 5px; font-size: 14px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #000000; background: #eeeeee;"&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;%&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;macro testmac&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;%&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;let pays1&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;FR &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;%&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;do l&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;%&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;to&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;data dico&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;pays&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;l&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;..&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;set&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; dico&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;pays&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;l &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;keep&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;varname&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; call symput&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000; background: transparent;"&gt;"nvarname"&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;trim&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;left&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;_n_&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;)))&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;run &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;data a&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;pays&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;l&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;set&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; a&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;pays&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;l&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;nouv_date&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;mdy&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;substr&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;date&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;6&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;2&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;),&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;01&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;substr&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;date&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;4&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;));&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;format nouv_date monyy5&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;.;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;run&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;proc&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; sql&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;create&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;table&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; toto &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;nouv_date date &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; nomvar varchar &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;12&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;));&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; quit&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;proc&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; sql&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;insert&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;into&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; toto &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; max&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;nouv_date&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;),&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000; background: transparent;"&gt;'&amp;amp;nvarname'&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;as&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; nouv_date &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;as&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; varname &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; a&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;pays&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;l &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;(&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;nvarname ne &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;.);&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;%&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;end&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;%&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;mend&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;%&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;testmac&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;A subsidiary question. Is it possible to have the varname and the date related to that varname into a macro variable? My man-a told me about this but I have never done that before.&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 15:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150051#M39555</guid>
      <dc:creator>andy_wk</dc:creator>
      <dc:date>2014-06-20T15:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: macro into a table and a macro variable with sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150052#M39556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;proc&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; sql&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;insert&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;into&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; toto &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; max&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;nouv_date&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;),&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;'&amp;amp;nvarname'&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;as&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; nouv_date &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;as&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; varname &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; a&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;pays&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;l &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;nvarname ne &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You need to have double-quotes around &amp;amp;nvarname, not single quotes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there seems to be an additional problem, the way you have coded the call symput, &amp;amp;nvarname will always have the same value ... is that what you want?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 15:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150052#M39556</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2014-06-20T15:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: macro into a table and a macro variable with sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150053#M39557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paige,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to have the list of the variables &lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;var12&amp;nbsp; &lt;/SPAN&gt;&lt;/CODE&gt;, &lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;var55 , &lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;var74.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 15:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150053#M39557</guid>
      <dc:creator>andy_wk</dc:creator>
      <dc:date>2014-06-20T15:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: macro into a table and a macro variable with sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150054#M39558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the difference between single quote and double quote?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 15:28:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150054#M39558</guid>
      <dc:creator>andy_wk</dc:creator>
      <dc:date>2014-06-20T15:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: macro into a table and a macro variable with sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150055#M39559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Macros inside single quotes are treated as plain text, with no macro meaning whatsoever. Thus, '&amp;amp;nvarname' is treated as the text inside the single quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macros inside double quotes are treated as macros and resolved to their value. Thus, if &amp;amp;nvarname takes on the value 12, then "&amp;amp;nvarname" will be replaced by "12".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get different values of your macro from the dataset you want something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call symputx('nvarname'||left(_n_),varname);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which will give you &amp;amp;nvarname1 to be var12, &amp;amp;nvarname2 to be var55 and so on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 15:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150055#M39559</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2014-06-20T15:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: macro into a table and a macro variable with sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150056#M39560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paige,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've replaced the code as such&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data dico&amp;amp;&amp;amp;pays&amp;amp;l..1 ; &lt;/P&gt;&lt;P&gt;set dico&amp;amp;&amp;amp;pays&amp;amp;l (keep=&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; background-color: #eeeeee;"&gt;varname&lt;/SPAN&gt;); &lt;/P&gt;&lt;P&gt;call symputx('n&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; background-color: #eeeeee;"&gt;varname&lt;/SPAN&gt;'||left(_n_),&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; background-color: #eeeeee;"&gt;varname&lt;/SPAN&gt;); &lt;/P&gt;&lt;P&gt;run ;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&amp;nbsp; &lt;/P&gt;&lt;P&gt;insert into toto SELECT max(nouv_date),"&amp;amp;n&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; background-color: #eeeeee;"&gt;varname&lt;/SPAN&gt;" FROM a&amp;amp;&amp;amp;pays&amp;amp;l.._1 WHERE (&amp;amp;n&lt;SPAN style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; background-color: #eeeeee;"&gt;varname&lt;/SPAN&gt; ne .); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I got this error (see below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a datetime constant, a missing value, BTRIM, INPUT, PUT, SUBSTRING, USER.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 15:50:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150056#M39560</guid>
      <dc:creator>andy_wk</dc:creator>
      <dc:date>2014-06-20T15:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: macro into a table and a macro variable with sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150057#M39561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well, here its not really clear what you are doing or what you would like to insert into toto &amp;lt;== this is the key question, if I know what you wanted to have here, I think the steps would be simple to advise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the syntax problem is that &amp;amp;nvarname doesn't exist, its not a macro variable any more, you now have macro variables &amp;amp;nvarname1 and &amp;amp;nvarname2 and &amp;amp;nvarname3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 16:25:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150057#M39561</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2014-06-20T16:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: macro into a table and a macro variable with sas</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150058#M39562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you really trying to do?&lt;/P&gt;&lt;P&gt;Why not just summarize the data using PROC SUMMARY?&lt;/P&gt;&lt;P&gt;Include a simple example of INPUT and then OUTPUT wanted. Just include a few variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if one table has a list of variable names and you want to use those names in a later place in SAS then perhaps PROC SQL is what you want to use?&lt;/P&gt;&lt;P&gt;proc sql noprint ;&lt;/P&gt;&lt;P&gt;select varname into :varlist separated by ' '&amp;nbsp; from namelist ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;proc summary data=HAVE ;&lt;/P&gt;&lt;P&gt;var &amp;amp;namelist ;&lt;/P&gt;&lt;P&gt;output out= WANT max= ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 16:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-into-a-table-and-a-macro-variable-with-sas/m-p/150058#M39562</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-06-20T16:58:20Z</dc:date>
    </item>
  </channel>
</rss>

