<?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 Error message when rename all variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-message-when-rename-all-variable/m-p/448207#M112734</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;It is so weird that the code below, which is posted in SAS support website, return error when I apply to my data.&lt;/P&gt;
&lt;P&gt;Can you help me with that?&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Original code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data one;
   input id name :$10. age score1 score2 score3 t;
   datalines;
1 George 10 85 90 8 9
2 Mary 11 99 98 9 1
3 John 12 100 100 10 0
4 Susan 11 78 89 10 0
;
run;
proc sql noprint;
   select cats(name,'=',name,'_OLD')
          into :list
          separated by ' '
          from dictionary.columns
          where libname = 'WORK' and memname = '&lt;FONT color="#FF0000"&gt;ONE&lt;/FONT&gt;'
          ;
quit;
proc datasets library = work nolist;
   modify &lt;FONT color="#FF0000"&gt;one&lt;/FONT&gt;;
   rename &amp;amp;list;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All I did is to change the file name ONE into "Prj_master" and the SQL return message of &lt;STRONG&gt;NOTE: No rows were selected.&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
   select cats(name,'=',name,'_OLD')
          into :list
          separated by ' '
          from dictionary.columns
          where libname = 'WORK' and memname = '&lt;FONT color="#FF0000"&gt;Prj_master&lt;/FONT&gt;'
          ;
quit;
proc datasets library = work nolist;
   modify &lt;FONT color="#FF0000"&gt;prj_Master&lt;/FONT&gt;;
   rename &amp;amp;list;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;15216&lt;BR /&gt;15217 proc import out= prj_Master&lt;BR /&gt;15218 datafile =&lt;BR /&gt;15218! "&amp;amp;export_folder.\&amp;amp;year&amp;amp;current_month.\&amp;amp;year.&amp;amp;current_month._Realtime_Report.xlsx"&lt;BR /&gt;15219 dbms = xlsx replace;&lt;BR /&gt;15220 sheet = "T6_Master_cost_no_PL";&lt;BR /&gt;15221 getnames = yes&lt;BR /&gt;15222 ;&lt;BR /&gt;15223 run;&lt;/P&gt;
&lt;P&gt;NOTE: The import data set has 175 observations and 32 variables.&lt;BR /&gt;NOTE: WORK.PRJ_MASTER data set was successfully created.&lt;BR /&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;BR /&gt; real time 0.06 seconds&lt;BR /&gt; cpu time 0.06 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;15224&lt;BR /&gt;15225&lt;BR /&gt;15226 proc sql noprint;&lt;BR /&gt;15227 select cats(name,'=',name,'_OLD')&lt;BR /&gt;15228 into :list&lt;BR /&gt;15229 separated by ' '&lt;BR /&gt;15230 from dictionary.columns&lt;BR /&gt;15231 where libname = 'WORK' and memname = 'Prj_master'&lt;BR /&gt;15232 ;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;NOTE: No rows were selected.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;15233 quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt; real time 0.00 seconds&lt;BR /&gt; cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Mar 2018 15:51:13 GMT</pubDate>
    <dc:creator>hhchenfx</dc:creator>
    <dc:date>2018-03-23T15:51:13Z</dc:date>
    <item>
      <title>Error message when rename all variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-when-rename-all-variable/m-p/448207#M112734</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;It is so weird that the code below, which is posted in SAS support website, return error when I apply to my data.&lt;/P&gt;
&lt;P&gt;Can you help me with that?&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Original code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data one;
   input id name :$10. age score1 score2 score3 t;
   datalines;
1 George 10 85 90 8 9
2 Mary 11 99 98 9 1
3 John 12 100 100 10 0
4 Susan 11 78 89 10 0
;
run;
proc sql noprint;
   select cats(name,'=',name,'_OLD')
          into :list
          separated by ' '
          from dictionary.columns
          where libname = 'WORK' and memname = '&lt;FONT color="#FF0000"&gt;ONE&lt;/FONT&gt;'
          ;
quit;
proc datasets library = work nolist;
   modify &lt;FONT color="#FF0000"&gt;one&lt;/FONT&gt;;
   rename &amp;amp;list;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All I did is to change the file name ONE into "Prj_master" and the SQL return message of &lt;STRONG&gt;NOTE: No rows were selected.&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
   select cats(name,'=',name,'_OLD')
          into :list
          separated by ' '
          from dictionary.columns
          where libname = 'WORK' and memname = '&lt;FONT color="#FF0000"&gt;Prj_master&lt;/FONT&gt;'
          ;
quit;
proc datasets library = work nolist;
   modify &lt;FONT color="#FF0000"&gt;prj_Master&lt;/FONT&gt;;
   rename &amp;amp;list;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;15216&lt;BR /&gt;15217 proc import out= prj_Master&lt;BR /&gt;15218 datafile =&lt;BR /&gt;15218! "&amp;amp;export_folder.\&amp;amp;year&amp;amp;current_month.\&amp;amp;year.&amp;amp;current_month._Realtime_Report.xlsx"&lt;BR /&gt;15219 dbms = xlsx replace;&lt;BR /&gt;15220 sheet = "T6_Master_cost_no_PL";&lt;BR /&gt;15221 getnames = yes&lt;BR /&gt;15222 ;&lt;BR /&gt;15223 run;&lt;/P&gt;
&lt;P&gt;NOTE: The import data set has 175 observations and 32 variables.&lt;BR /&gt;NOTE: WORK.PRJ_MASTER data set was successfully created.&lt;BR /&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;BR /&gt; real time 0.06 seconds&lt;BR /&gt; cpu time 0.06 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;15224&lt;BR /&gt;15225&lt;BR /&gt;15226 proc sql noprint;&lt;BR /&gt;15227 select cats(name,'=',name,'_OLD')&lt;BR /&gt;15228 into :list&lt;BR /&gt;15229 separated by ' '&lt;BR /&gt;15230 from dictionary.columns&lt;BR /&gt;15231 where libname = 'WORK' and memname = 'Prj_master'&lt;BR /&gt;15232 ;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;NOTE: No rows were selected.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;15233 quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt; real time 0.00 seconds&lt;BR /&gt; cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 15:51:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-when-rename-all-variable/m-p/448207#M112734</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2018-03-23T15:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error message when rename all variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-when-rename-all-variable/m-p/448210#M112735</link>
      <description>&lt;P&gt;The code is case sensitive.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your table name should be all upper case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; where libname = 'WORK' and memname = 'ONE'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Yours:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where libname = 'WORK' and memname = 'Prj_master'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I usually just upcase everything:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where libname = 'WORK' and upcase(memname) = upcase('Prj_master')&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 15:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-when-rename-all-variable/m-p/448210#M112735</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-23T15:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error message when rename all variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-when-rename-all-variable/m-p/448224#M112747</link>
      <description>&lt;P&gt;The values in LIBNAME and MEMNAME in the metadata tables is always in uppercase.&lt;/P&gt;
&lt;P&gt;That is why no observations matched your search.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;          where libname = 'WORK' and memname = 'PRJ_MASTER'&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:26:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-when-rename-all-variable/m-p/448224#M112747</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-03-23T16:26:38Z</dc:date>
    </item>
  </channel>
</rss>

