<?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: Using Drop conditionally in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/472002#M120965</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/171420"&gt;@BIDD&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to combine 2 data sets as below and i am not sure how to use both where and Drop functions together for data set history.adm_ytd_pivot_2017.&lt;/P&gt;
&lt;P&gt;It would be great help if you can assist me with this.&lt;/P&gt;
&lt;PRE&gt;data adm_en4;
set adm_en3 history.adm_2017(where=( commence_year = '2017'));
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Just add the drop dataset options:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data adm_en4;
set
  adm_en3
  history.adm_2017 (
    drop=variables you want to drop
    where=(commence_year = '2017')
  )
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 21 Jun 2018 07:53:43 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-06-21T07:53:43Z</dc:date>
    <item>
      <title>Using Drop contionally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/471981#M120951</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to combine 2 data sets as below and i am not sure how to use both where and Drop functions together for data set history.adm_ytd_pivot_2017.&lt;/P&gt;&lt;P&gt;It would be great help if you can assist me with this.&lt;/P&gt;&lt;PRE&gt;data adm_en4;
set adm_en3 history.adm_2017(where=( commence_year = '2017'));
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 06:08:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/471981#M120951</guid>
      <dc:creator>BIDD</dc:creator>
      <dc:date>2018-06-21T06:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drop contionally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/471984#M120953</link>
      <description>&lt;P&gt;If you want the where clause applied to all source data sets then you can write your code as below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data adm_en4;
  set adm_en3 history.adm_2017;
  where commence_year = '2017';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The way you've done it will only apply the where clause for the data set which goes with the where clause.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 06:14:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/471984#M120953</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-06-21T06:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drop contionally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/471988#M120956</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i want to use Where&amp;nbsp; and drop clause only for history.adm_2017, no changes in adm_en3 data.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 06:43:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/471988#M120956</guid>
      <dc:creator>BIDD</dc:creator>
      <dc:date>2018-06-21T06:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drop contionally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/472000#M120963</link>
      <description>&lt;P&gt;Then put them on the set part as you have done:&lt;/P&gt;
&lt;PRE&gt;data adm_en4;
  set adm_en3 history.adm_2017(where=( commence_year = '2017') drop=...);
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jun 2018 07:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/472000#M120963</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-21T07:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drop conditionally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/472002#M120965</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/171420"&gt;@BIDD&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to combine 2 data sets as below and i am not sure how to use both where and Drop functions together for data set history.adm_ytd_pivot_2017.&lt;/P&gt;
&lt;P&gt;It would be great help if you can assist me with this.&lt;/P&gt;
&lt;PRE&gt;data adm_en4;
set adm_en3 history.adm_2017(where=( commence_year = '2017'));
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Just add the drop dataset options:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data adm_en4;
set
  adm_en3
  history.adm_2017 (
    drop=variables you want to drop
    where=(commence_year = '2017')
  )
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jun 2018 07:53:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/472002#M120965</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-21T07:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drop conditionally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/472340#M121106</link>
      <description>&lt;P&gt;Hi, thanks for the advice...it worked.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 00:56:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/472340#M121106</guid>
      <dc:creator>BIDD</dc:creator>
      <dc:date>2018-06-22T00:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drop contionally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/472341#M121107</link>
      <description>Hi, thanks for the advice...it worked.</description>
      <pubDate>Fri, 22 Jun 2018 00:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Drop-contionally/m-p/472341#M121107</guid>
      <dc:creator>BIDD</dc:creator>
      <dc:date>2018-06-22T00:56:29Z</dc:date>
    </item>
  </channel>
</rss>

