<?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: Subsetting a dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Subsetting-a-dataset/m-p/810167#M319477</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/369095"&gt;@ramgouveia&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want to subset a dataset where I want to keep:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;all obervations that match every values different from 620 in variable A;&lt;/LI&gt;
&lt;LI&gt;AND all observations that equals 620 in variable A AND are do not start with 6 in variable B.&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data FINAL;
set INITIAL;
where (VAR_B ^=: '6' and VAR_A = '620') or VAR_A ^= '620';
put VAR_B=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is ths program correct?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can find out if the program is correct by actually running it. We can't tell for sure if it is correct because we don't have your data.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Apr 2022 14:20:52 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-04-27T14:20:52Z</dc:date>
    <item>
      <title>Subsetting a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subsetting-a-dataset/m-p/810149#M319474</link>
      <description>&lt;P&gt;I want to subset a dataset where I want to keep:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;all obervations that match every values different from 620 in variable A;&lt;/LI&gt;
&lt;LI&gt;AND all observations that equals 620 in variable A AND are do not start with 6 in variable B.&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data FINAL;
set INITIAL;
where (VAR_B ^=: '6' and VAR_A = '620') or VAR_A ^= '620';
put VAR_B=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is ths program correct?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 13:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subsetting-a-dataset/m-p/810149#M319474</guid>
      <dc:creator>ramgouveia</dc:creator>
      <dc:date>2022-04-27T13:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Subsetting a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subsetting-a-dataset/m-p/810167#M319477</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/369095"&gt;@ramgouveia&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want to subset a dataset where I want to keep:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;all obervations that match every values different from 620 in variable A;&lt;/LI&gt;
&lt;LI&gt;AND all observations that equals 620 in variable A AND are do not start with 6 in variable B.&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data FINAL;
set INITIAL;
where (VAR_B ^=: '6' and VAR_A = '620') or VAR_A ^= '620';
put VAR_B=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is ths program correct?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can find out if the program is correct by actually running it. We can't tell for sure if it is correct because we don't have your data.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 14:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subsetting-a-dataset/m-p/810167#M319477</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-27T14:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Subsetting a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subsetting-a-dataset/m-p/810180#M319484</link>
      <description>Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;I ran the code and it worked correctly.</description>
      <pubDate>Wed, 27 Apr 2022 14:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subsetting-a-dataset/m-p/810180#M319484</guid>
      <dc:creator>ramgouveia</dc:creator>
      <dc:date>2022-04-27T14:57:36Z</dc:date>
    </item>
  </channel>
</rss>

