<?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: SET statement and OUTPUT and PDV in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410458#M100282</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Read this document under the heading&lt;FONT size="3"&gt;&lt;STRONG&gt; Combining SAS Data Sets&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000173782.htm#a000224294" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000173782.htm#a000224294&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"If the data sets contain common variables, the values that are read in from the last data set replace the values that were read in from earlier ones.&amp;nbsp;"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Nov 2017 21:08:16 GMT</pubDate>
    <dc:creator>SuryaKiran</dc:creator>
    <dc:date>2017-11-03T21:08:16Z</dc:date>
    <item>
      <title>SET statement and OUTPUT and PDV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410441#M100277</link>
      <description>&lt;P&gt;data a;&lt;BR /&gt;set sashelp.class sashelp.class;output;&lt;BR /&gt;set sashelp.class;output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;NOTE: There were 1 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;NOTE: The data set WORK.A has 39 observations and 5 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone explain why we getting 1 for observation for 2nd dataset I guess we get total of 38 observations I just confuse in it..&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 19:59:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410441#M100277</guid>
      <dc:creator>rajeshalwayswel</dc:creator>
      <dc:date>2017-11-03T19:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: SET statement and OUTPUT and PDV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410451#M100279</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
set sashelp.class(in=a) sashelp.class(in=b);aa=a; bb=b; output;
set sashelp.class(in=c); cc=c; output;
run;&lt;BR /&gt;proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When you have doubts about what SAS is doing, ask SAS to explain. So I set binary flags so that you can see from where each observation originates. Near the end of processing, William is read from the first mention of the data set.&amp;nbsp; Then it is read from the last.&amp;nbsp; Then on the next pass, Alfred is read from the second data set, then SAS hits end of file on the last data set.&amp;nbsp; So only one obs is read from the second mention.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 20:28:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410451#M100279</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-11-03T20:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: SET statement and OUTPUT and PDV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410458#M100282</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Read this document under the heading&lt;FONT size="3"&gt;&lt;STRONG&gt; Combining SAS Data Sets&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000173782.htm#a000224294" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000173782.htm#a000224294&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"If the data sets contain common variables, the values that are read in from the last data set replace the values that were read in from earlier ones.&amp;nbsp;"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 21:08:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410458#M100282</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2017-11-03T21:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: SET statement and OUTPUT and PDV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410477#M100287</link>
      <description>&lt;P&gt;The notes seem pretty clear. You read in 39 observations and wrote out 39 observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the first 19 times through the data step loop you read and write twice and so generate 38 output records.&lt;/P&gt;
&lt;P&gt;But on the 20th time through the loop the first SET/OUTPUT pair runs and writes the 39th output record, but the data step stops when it reads past the end of the data in the second SET statement.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 21:42:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410477#M100287</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-03T21:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: SET statement and OUTPUT and PDV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410499#M100300</link>
      <description>&lt;P&gt;The first SET statement has an incoming stream of up to 38 obs. The second has 19.&amp;nbsp;&amp;nbsp; So there are 19 iterations of the data step in which both SETs read a record.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the 20th iteration, the first SET is successful (but at that point is just starting its 2nd data set file.&amp;nbsp;&amp;nbsp; But the 20th iteration also exceeds the limit of the 2nd SET, thereby terminating the data step. So the first SET reads 19 +1, and the second&amp;nbsp; reads 19.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 23:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410499#M100300</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-11-03T23:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: SET statement and OUTPUT and PDV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410527#M100309</link>
      <description>&lt;P&gt;Good question.&lt;/P&gt;
&lt;P&gt;I just want say.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;data a;&lt;BR /&gt;set &lt;STRONG&gt;sashelp.class&lt;/STRONG&gt; sashelp.class;output;&lt;BR /&gt;set sashelp.class;output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;NOTE: There were 1 observations read from the data set SASHELP.CLASS.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;data a;&lt;BR /&gt;set sashelp.class &lt;STRONG&gt;sashelp.class&lt;/STRONG&gt;;output;&lt;BR /&gt;set sashelp.class;output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;data a;&lt;BR /&gt;set sashelp.class sashelp.class;output;&lt;BR /&gt;set &lt;STRONG&gt;sashelp.class;&lt;/STRONG&gt;output;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2017 12:40:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SET-statement-and-OUTPUT-and-PDV/m-p/410527#M100309</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-11-04T12:40:45Z</dc:date>
    </item>
  </channel>
</rss>

