<?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: interleaving in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/400077#M96961</link>
    <description>Thanks for your reply!</description>
    <pubDate>Sun, 01 Oct 2017 02:43:46 GMT</pubDate>
    <dc:creator>pchen002</dc:creator>
    <dc:date>2017-10-01T02:43:46Z</dc:date>
    <item>
      <title>interleaving</title>
      <link>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/399980#M96913</link>
      <description>&lt;DIV&gt;data brothers.three;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;set brothers.one;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;set brothers.two;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;P class="rtejustify"&gt;&lt;STRONG&gt;&lt;IMG src="http://www.analyticsexam.com/files/sas-exam.com/files/user514/C13%20Q1.JPG" border="0" alt="" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="rtejustify"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="rtejustify"&gt;&lt;STRONG&gt;After researching, still don't quite understand why var X in Brother Three is only 2 &amp;amp; 4 and data 5,Karl is gone as well, new to SAS, please help!thanks&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 08:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/399980#M96913</guid>
      <dc:creator>pchen002</dc:creator>
      <dc:date>2017-09-30T08:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: interleaving</title>
      <link>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/399983#M96916</link>
      <description>&lt;P&gt;One way to look at this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The values in the first data set are "replaced" by the values in the second data set (if they exist).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, all the VarX in the first data set have been replaced by all the VarX in the second data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the VarY have made it to the end, as there are no VarY in the second data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Similarly, the VarZ appear in the final data set, as there is nothing to replace them.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 08:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/399983#M96916</guid>
      <dc:creator>Norman21</dc:creator>
      <dc:date>2017-09-30T08:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: interleaving</title>
      <link>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/399993#M96919</link>
      <description>&lt;P&gt;This program does not interleave anything, since it is missing this statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;by VarX;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try adding it and examine the results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then turn the two SET statements into a single statement (the normal way to interleave) and examine the results:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data brothers.three;&lt;/P&gt;
&lt;P&gt;set brothers.one brothers.two;&lt;/P&gt;
&lt;P&gt;by varX;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 13:43:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/399993#M96919</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-09-30T13:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: interleaving</title>
      <link>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/399995#M96921</link>
      <description>&lt;P&gt;Two SET statements means 2 parallel streams of data.&amp;nbsp; When any SET reaches beyond end of its data step, the data step stops. so the result is no longer than the shorter incoming data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MERGE (without an associated&amp;nbsp; BY statement) on the other hand, wlll not stop the data step until the longer incoming is exhausted.&amp;nbsp; So&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; merge brothers.three brothers.two;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;would yield three observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use&amp;nbsp;&amp;nbsp; SET one two; by varx;,&amp;nbsp; then you will get interleaved datasets, because it's a single multi-component stream.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 13:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/399995#M96921</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-09-30T13:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: interleaving</title>
      <link>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/400003#M96927</link>
      <description>&lt;P&gt;Actually, the program written by pchen002 could be described as one-to-one reading:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"One-to-one reading combines observations from two or more SAS data sets by creating observations that contain all of the variables from each contributing data set. Observations are combined based on their relative position in each data set, that is, the first observation in one data set with the first in the other, and so on. The DATA step stops after it has read the last observation from the smallest data set."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p15jvywi5avt3cn1bee8r6c33ux1.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p15jvywi5avt3cn1bee8r6c33ux1.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 15:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/400003#M96927</guid>
      <dc:creator>Norman21</dc:creator>
      <dc:date>2017-09-30T15:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: interleaving</title>
      <link>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/400076#M96960</link>
      <description>Thanks!</description>
      <pubDate>Sun, 01 Oct 2017 02:43:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/400076#M96960</guid>
      <dc:creator>pchen002</dc:creator>
      <dc:date>2017-10-01T02:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: interleaving</title>
      <link>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/400077#M96961</link>
      <description>Thanks for your reply!</description>
      <pubDate>Sun, 01 Oct 2017 02:43:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/interleaving/m-p/400077#M96961</guid>
      <dc:creator>pchen002</dc:creator>
      <dc:date>2017-10-01T02:43:46Z</dc:date>
    </item>
  </channel>
</rss>

