<?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: scan all variables and keep only subset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/scan-all-variables-and-keep-only-subset/m-p/596512#M171754</link>
    <description>That worked- thank you so much</description>
    <pubDate>Tue, 15 Oct 2019 13:26:24 GMT</pubDate>
    <dc:creator>TPayne</dc:creator>
    <dc:date>2019-10-15T13:26:24Z</dc:date>
    <item>
      <title>scan all variables and keep only subset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-all-variables-and-keep-only-subset/m-p/596506#M171751</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with over 1000 variables, I want to scan this entire dataset and create a subset of data that contains all variables with the suffix "_MEAN" Any insight would help. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cat_mean&amp;nbsp; &amp;nbsp;cat_toy&amp;nbsp; dog_mean&amp;nbsp; dog_toy&amp;nbsp; &amp;nbsp;bird_mean&amp;nbsp; &amp;nbsp;bird_toy&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;7.00&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.987&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 56&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.345&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;67&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cat_mean&amp;nbsp; &amp;nbsp;dog_mean&amp;nbsp; &amp;nbsp; bird_mean&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;7.00&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.987&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.345&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 13:00:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-all-variables-and-keep-only-subset/m-p/596506#M171751</guid>
      <dc:creator>TPayne</dc:creator>
      <dc:date>2019-10-15T13:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: scan all variables and keep only subset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-all-variables-and-keep-only-subset/m-p/596508#M171752</link>
      <description>&lt;P&gt;One way&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input cat_mean cat_toy dog_mean dog_toy bird_mean bird_toy;
datalines;
7.00 2 0.987 56 1.345 67
;
 
proc sql noprint;
	select name into :vars separated by ' ' 
	from dictionary.columns 
	where upcase(libname)=upcase('work') 
	  and upcase(memname)=upcase('have')
	  and upcase(name) like "%_MEAN";
quit;

data want;
    set have;
    keep &amp;amp;vars.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Oct 2019 13:07:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-all-variables-and-keep-only-subset/m-p/596508#M171752</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-10-15T13:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: scan all variables and keep only subset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-all-variables-and-keep-only-subset/m-p/596512#M171754</link>
      <description>That worked- thank you so much</description>
      <pubDate>Tue, 15 Oct 2019 13:26:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-all-variables-and-keep-only-subset/m-p/596512#M171754</guid>
      <dc:creator>TPayne</dc:creator>
      <dc:date>2019-10-15T13:26:24Z</dc:date>
    </item>
  </channel>
</rss>

