<?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 created two data sets in set statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/created-two-data-sets-in-set-statement/m-p/494725#M130433</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;May anyone explain the following code.&lt;/P&gt;&lt;P&gt;Why in data set One I get 8 observations?&lt;/P&gt;&lt;P&gt;Why in data set two I get 5 observations?&lt;/P&gt;&lt;P&gt;What is the name of subject in this example?(We created two data sets in set statement)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data tbl1;
input Var1 $ Var2 $;
cards;
A one
A two
B three
C four
A five
;
run;

data ONE   TWO;
set tbl1;
if Var1='A' then output ONE;
output;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Sep 2018 06:04:22 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2018-09-12T06:04:22Z</dc:date>
    <item>
      <title>created two data sets in set statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/created-two-data-sets-in-set-statement/m-p/494725#M130433</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;May anyone explain the following code.&lt;/P&gt;&lt;P&gt;Why in data set One I get 8 observations?&lt;/P&gt;&lt;P&gt;Why in data set two I get 5 observations?&lt;/P&gt;&lt;P&gt;What is the name of subject in this example?(We created two data sets in set statement)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data tbl1;
input Var1 $ Var2 $;
cards;
A one
A two
B three
C four
A five
;
run;

data ONE   TWO;
set tbl1;
if Var1='A' then output ONE;
output;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 06:04:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/created-two-data-sets-in-set-statement/m-p/494725#M130433</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-09-12T06:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: created two data sets in set statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/created-two-data-sets-in-set-statement/m-p/494726#M130434</link>
      <description>Since there is no ELSE, you'll have dual OUTPUT statements for A. &lt;BR /&gt;5+3=8.</description>
      <pubDate>Wed, 12 Sep 2018 06:10:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/created-two-data-sets-in-set-statement/m-p/494726#M130434</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-09-12T06:10:32Z</dc:date>
    </item>
  </channel>
</rss>

