<?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: keep and drop in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/keep-and-drop/m-p/36056#M7106</link>
    <description>Also, you want to review the OPTIONS DKRICOND=  and DKROCOND=  parameters.&lt;BR /&gt;
&lt;BR /&gt;
And, consider the use of the DROP= and KEEP=  SAS dataset options.&lt;BR /&gt;
&lt;BR /&gt;
Lastly, DROP overrides KEEP when specifying a named SAS variable or variable prefix/stem.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Thu, 31 Dec 2009 14:57:41 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-12-31T14:57:41Z</dc:date>
    <item>
      <title>keep and drop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/keep-and-drop/m-p/36054#M7104</link>
      <description>what is the difference using of keep and drop statement in DATASET,SET statement and PROC step ?please explain me.Thanks in advance.</description>
      <pubDate>Thu, 31 Dec 2009 07:48:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/keep-and-drop/m-p/36054#M7104</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-31T07:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: keep and drop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/keep-and-drop/m-p/36055#M7105</link>
      <description>KEEP and DROP are complementary statements. I tend to use the one that has the shorter variable list. If you read 10 variables and want to keep 9, then DROP the 1 variable not required. However, if you only want to keep 2 of them it makes sense to code those 2 on a KEEP statement rather than listing the other 8 on a DROP.</description>
      <pubDate>Thu, 31 Dec 2009 09:52:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/keep-and-drop/m-p/36055#M7105</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-31T09:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: keep and drop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/keep-and-drop/m-p/36056#M7106</link>
      <description>Also, you want to review the OPTIONS DKRICOND=  and DKROCOND=  parameters.&lt;BR /&gt;
&lt;BR /&gt;
And, consider the use of the DROP= and KEEP=  SAS dataset options.&lt;BR /&gt;
&lt;BR /&gt;
Lastly, DROP overrides KEEP when specifying a named SAS variable or variable prefix/stem.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 31 Dec 2009 14:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/keep-and-drop/m-p/36056#M7106</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-31T14:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: keep and drop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/keep-and-drop/m-p/36057#M7107</link>
      <description>From my knowledge there is no actual differences between KEEP/DROP used from a Datastep or SAS Procedure. So a KEEP/DROP statement will do and work pretty much the same if used from within a Datastep or SAS Procedure.&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Tue, 05 Jan 2010 11:09:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/keep-and-drop/m-p/36057#M7107</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2010-01-05T11:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: keep and drop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/keep-and-drop/m-p/36058#M7108</link>
      <description>I just discovered an important (and potentially frustrating--as it was in my case) difference between DROP and KEEP.&lt;BR /&gt;
&lt;BR /&gt;
When including a DROP or KEEP statement within the DATA statement (and before the INPUT statement), the KEEP statement prevents you from creating custom variables in the INFILE statement.&lt;BR /&gt;
&lt;BR /&gt;
For example, I was trying to extract a 7-character numeric string from the end of an existing variable and put it into a new variable.&lt;BR /&gt;
&lt;BR /&gt;
Through the process of elimination I determined that the KEEP statement disallows the creation of custom variables, while the DROP statement does not interfere with the addition of new variables.&lt;BR /&gt;
&lt;BR /&gt;
The default for imported CSV files in EG4.3 appears to be the KEEP statement, so if you want to add custom variables within the preexisting generated EG4.3 code, you need to switch this KEEP statement to the DROP statement (and switch your variables accordingly).&lt;BR /&gt;
&lt;BR /&gt;
I would be interesting to hear if someone has an easier way to work around this difference.&lt;BR /&gt;
&lt;BR /&gt;
PQK</description>
      <pubDate>Tue, 01 Mar 2011 01:22:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/keep-and-drop/m-p/36058#M7108</guid>
      <dc:creator>PQK</dc:creator>
      <dc:date>2011-03-01T01:22:16Z</dc:date>
    </item>
  </channel>
</rss>

