<?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 Trying to rearrange variables alphabetically. Warning: Apparent symbolic reference not resolved? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-rearrange-variables-alphabetically-Warning-Apparent/m-p/752896#M237199</link>
    <description>&lt;P&gt;I am trying to rearrange alphabetically these variables using a macro. But I get an error&amp;nbsp; - Apparent symbolic reference not resolved?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA My_data;
INPUT A C Z M L ;
DATALINES;
1 3 26 13 12
;
RUN;

proc sql noprint;
select name into :vars separated by ' '
from dictionary.columns
where libname = 'WORK' and memname = 'My_data'
order by name;
quit;

data My_data_rearranged;
retain &amp;amp;vars;
set My_data;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;WARNING: Apparent symbolic reference VARS not resolved.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, ;, _ALL_, _CHARACTER_,&lt;BR /&gt;_CHAR_, _NUMERIC_.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jul 2021 15:24:25 GMT</pubDate>
    <dc:creator>DougHold</dc:creator>
    <dc:date>2021-07-08T15:24:25Z</dc:date>
    <item>
      <title>Trying to rearrange variables alphabetically. Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-rearrange-variables-alphabetically-Warning-Apparent/m-p/752896#M237199</link>
      <description>&lt;P&gt;I am trying to rearrange alphabetically these variables using a macro. But I get an error&amp;nbsp; - Apparent symbolic reference not resolved?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA My_data;
INPUT A C Z M L ;
DATALINES;
1 3 26 13 12
;
RUN;

proc sql noprint;
select name into :vars separated by ' '
from dictionary.columns
where libname = 'WORK' and memname = 'My_data'
order by name;
quit;

data My_data_rearranged;
retain &amp;amp;vars;
set My_data;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;WARNING: Apparent symbolic reference VARS not resolved.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, ;, _ALL_, _CHARACTER_,&lt;BR /&gt;_CHAR_, _NUMERIC_.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 15:24:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-rearrange-variables-alphabetically-Warning-Apparent/m-p/752896#M237199</guid>
      <dc:creator>DougHold</dc:creator>
      <dc:date>2021-07-08T15:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to rearrange variables alphabetically. Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-rearrange-variables-alphabetically-Warning-Apparent/m-p/752898#M237201</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where libname = 'WORK' and upper(memname) = 'MY_DATA'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;You likely have an empty macro variable because of the case mismatch. &lt;BR /&gt;&lt;BR /&gt;You can test it by adding this line before your data step:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%PUT &amp;amp;vars.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/381269"&gt;@DougHold&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am trying to rearrange alphabetically these variables using a macro. But I get an error&amp;nbsp; - Apparent symbolic reference not resolved?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA My_data;
INPUT A C Z M L ;
DATALINES;
1 3 26 13 12
;
RUN;

proc sql noprint;
select name into :vars separated by ' '
from dictionary.columns
where libname = 'WORK' and memname = 'My_data'
order by name;
quit;

data My_data_rearranged;
retain &amp;amp;vars;
set My_data;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;WARNING: Apparent symbolic reference VARS not resolved.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, ;, _ALL_, _CHARACTER_,&lt;BR /&gt;_CHAR_, _NUMERIC_.&lt;/P&gt;
&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 15:40:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-rearrange-variables-alphabetically-Warning-Apparent/m-p/752898#M237201</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-08T15:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to rearrange variables alphabetically. Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-rearrange-variables-alphabetically-Warning-Apparent/m-p/752899#M237202</link>
      <description>&lt;P&gt;Always good to look at the ENTIRE log in cases like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 80         proc sql noprint;
 81         select name into :vars separated by ' '
 82         from dictionary.columns
 83         where libname = 'WORK' and memname = 'My_data'
 84         order by name;
&lt;FONT color="#FF0000"&gt; NOTE: No rows were selected.&lt;/FONT&gt;
 85         quit;&lt;/PRE&gt;
&lt;P&gt;There's the problem. In DICTIONARY.COLUMNS, you have found zero matches. Why? The value of variable &lt;FONT face="courier new,courier"&gt;memname&lt;/FONT&gt; is always in all capitals, so your code says find &lt;FONT face="courier new,courier"&gt;memname='My_data'&lt;/FONT&gt; and it doesn't find any matches.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having said that, why even bother re-arranging columns? It's extra work, but SAS doesn't care, your programs will work regardless of the order of the columns.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 15:46:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-rearrange-variables-alphabetically-Warning-Apparent/m-p/752899#M237202</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-08T15:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to rearrange variables alphabetically. Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-rearrange-variables-alphabetically-Warning-Apparent/m-p/752953#M237228</link>
      <description>Thank you for the tip on testing with %PUT &amp;amp;vars.;</description>
      <pubDate>Thu, 08 Jul 2021 17:50:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-rearrange-variables-alphabetically-Warning-Apparent/m-p/752953#M237228</guid>
      <dc:creator>DougHold</dc:creator>
      <dc:date>2021-07-08T17:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to rearrange variables alphabetically. Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-rearrange-variables-alphabetically-Warning-Apparent/m-p/752954#M237229</link>
      <description>Thank you, this was it</description>
      <pubDate>Thu, 08 Jul 2021 17:50:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-rearrange-variables-alphabetically-Warning-Apparent/m-p/752954#M237229</guid>
      <dc:creator>DougHold</dc:creator>
      <dc:date>2021-07-08T17:50:46Z</dc:date>
    </item>
  </channel>
</rss>

