<?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/keep vs drop=/keep= in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/drop-keep-vs-drop-keep/m-p/497563#M131908</link>
    <description>&lt;P&gt;Yes.&amp;nbsp;&lt;BR /&gt;DROP/KEEP are STATEMENTS usually only valid in a SAS data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DROP=/KEEP= are data set OPTIONS. They can be used almost anywhere you reference a SAS data set including in a SQL step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They act at different points of time, for example a KEEP statement in the data step will only keep variables but they're available for calculations. If you use DROP = on a data set that's being read for example that data is not read into the step and cannot be used in calculations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want1 (drop=weight) want2 (drop=height); *variables are dropped for output data sets;

set sashelp.class (drop=age); *age is dropped before the data is read in;

new_name = catt(name, ' Smith');

drop name;*name is dropped for all data sets but is available for calculations;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 20 Sep 2018 21:08:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-09-20T21:08:39Z</dc:date>
    <item>
      <title>drop/keep vs drop=/keep=</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-keep-vs-drop-keep/m-p/497555#M131900</link>
      <description>&lt;P&gt;is there any difference in the drop, keep, (drop=), and (keep=) function?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 20:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-keep-vs-drop-keep/m-p/497555#M131900</guid>
      <dc:creator>clqa</dc:creator>
      <dc:date>2018-09-20T20:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: drop/keep vs drop=/keep=</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-keep-vs-drop-keep/m-p/497560#M131905</link>
      <description>Hi:&lt;BR /&gt;  We cover the use of DROP and KEEP statements versus DROP= and KEEP= options in our Programming 1 and Programming 2 classes. For a discussion of the differences, you might want to look in the documentation.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Thu, 20 Sep 2018 21:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-keep-vs-drop-keep/m-p/497560#M131905</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-09-20T21:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: drop/keep vs drop=/keep=</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-keep-vs-drop-keep/m-p/497563#M131908</link>
      <description>&lt;P&gt;Yes.&amp;nbsp;&lt;BR /&gt;DROP/KEEP are STATEMENTS usually only valid in a SAS data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DROP=/KEEP= are data set OPTIONS. They can be used almost anywhere you reference a SAS data set including in a SQL step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They act at different points of time, for example a KEEP statement in the data step will only keep variables but they're available for calculations. If you use DROP = on a data set that's being read for example that data is not read into the step and cannot be used in calculations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want1 (drop=weight) want2 (drop=height); *variables are dropped for output data sets;

set sashelp.class (drop=age); *age is dropped before the data is read in;

new_name = catt(name, ' Smith');

drop name;*name is dropped for all data sets but is available for calculations;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Sep 2018 21:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-keep-vs-drop-keep/m-p/497563#M131908</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-20T21:08:39Z</dc:date>
    </item>
  </channel>
</rss>

