<?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: Drop lowercase variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449539#M283576</link>
    <description>Thanks you.</description>
    <pubDate>Thu, 29 Mar 2018 00:08:20 GMT</pubDate>
    <dc:creator>Jackwangliang</dc:creator>
    <dc:date>2018-03-29T00:08:20Z</dc:date>
    <item>
      <title>Drop lowercase variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449213#M283570</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I drop lowercase variable? For example,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;original variable set:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CHF VALVVE&amp;nbsp;PULMCIRC OBESE oCHF&amp;nbsp;oVALVVE&lt;SPAN&gt;&amp;nbsp;oPULMCIRC oOBESE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;target variable set:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CHF&amp;nbsp;VALVVE&amp;nbsp;PULMCIRC OBESE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;JackLiang&lt;/SPAN&gt;&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>Wed, 28 Mar 2018 03:49:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449213#M283570</guid>
      <dc:creator>Jackwangliang</dc:creator>
      <dc:date>2018-03-28T03:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Drop lowercase variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449216#M283571</link>
      <description>&lt;P&gt;You may prefer use KEEP instead DROP.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 04:33:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449216#M283571</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-03-28T04:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Drop lowercase variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449217#M283572</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
  retain CHF VALVVE PULMCIRC OBESE oCHF oVALVVE oPULMCIRC oOBESE 1;
run;
proc contents data=HAVE noprint out=CONT;
run;
data _null_;
  set CONT end=LASTOBS;
  if _N_ = 1                  then call execute('data WANT; set HAVE; drop ');
  if prxmatch('/[a-z]/',NAME) then call execute(NAME);
  if LASTOBS                  then call execute(';run;');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 04:40:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449217#M283572</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-03-28T04:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Drop lowercase variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449218#M283573</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
length CHF VALVVE PULMCIRC OBESE oCHF oVALVVE oPULMCIRC oOBESE 8;

run;
proc contents data=HAVE noprint out=_have;
quit;
proc sql;
select 	name into :drop separated by ' '
from _have 
where  anylower(name)&amp;gt;0;
QUIT;

data want;
set have;
drop &amp;amp;drop;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Mar 2018 04:43:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449218#M283573</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-03-28T04:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Drop lowercase variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449280#M283574</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/133886"&gt;@Jackwangliang&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Or if the variables you want to drop always start with a lowercase o then here a coding variant to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  length CHF VALVVE PULMCIRC OBESE oCHF oVALVVE oPULMCIRC oOBESE 8;
  stop;
run;

proc sql noprint;
  select  name into :drop separated by ' '
    from dictionary.columns
    where libname='WORK' and memname='HAVE' and name like 'o%'
    ;
quit; 

data want;
  set have;
  drop &amp;amp;drop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or this way in case your&amp;nbsp;table is in a data base or/and you want to conserve indices and the like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  length CHF VALVVE PULMCIRC OBESE oCHF oVALVVE oPULMCIRC oOBESE 8;
  stop;
run;

%let drop=;
proc sql noprint feedback;
  select  name into :drop separated by ','
    from dictionary.columns
    where libname='WORK' and memname='HAVE' and name like 'o%'
    ;
  alter table have
    drop &amp;amp;drop
  ;
quit; 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Mar 2018 11:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449280#M283574</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-03-28T11:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Drop lowercase variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449538#M283575</link>
      <description>Thank you.</description>
      <pubDate>Thu, 29 Mar 2018 00:08:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449538#M283575</guid>
      <dc:creator>Jackwangliang</dc:creator>
      <dc:date>2018-03-29T00:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Drop lowercase variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449539#M283576</link>
      <description>Thanks you.</description>
      <pubDate>Thu, 29 Mar 2018 00:08:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449539#M283576</guid>
      <dc:creator>Jackwangliang</dc:creator>
      <dc:date>2018-03-29T00:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Drop lowercase variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449540#M283577</link>
      <description>Thank you</description>
      <pubDate>Thu, 29 Mar 2018 00:08:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Drop-lowercase-variable/m-p/449540#M283577</guid>
      <dc:creator>Jackwangliang</dc:creator>
      <dc:date>2018-03-29T00:08:44Z</dc:date>
    </item>
  </channel>
</rss>

