<?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: concatenate the three data sets by its observation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207034#M267188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Normally I would code DO _N_ = 1 BY 1 UNTIL(...), so I just assumed you had done the same.&lt;/P&gt;&lt;P&gt;But in that case the _N_=1 to 1 is doing nothing of value.&amp;nbsp; Why not just IF not EOF1 then DO; ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jun 2015 19:49:58 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2015-06-16T19:49:58Z</dc:date>
    <item>
      <title>concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207021#M267175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to concatenate the three data sets by its observation, please give me the idea to proceed on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data set A;&lt;/P&gt;&lt;P&gt;Num Var1&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; abc&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xyz&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data set B;&lt;/P&gt;&lt;P&gt;Num Var1&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; aaa&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qqq&lt;/P&gt;&lt;P&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zzz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data set C;&lt;/P&gt;&lt;P&gt;Num Var1&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qwe&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ert&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result dataset should be as below:&lt;/P&gt;&lt;P&gt;Num Var1&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; abc&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; aaa&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qwe&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xyz&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qqq&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ert&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mno&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zzz&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rty&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;The result dataset should be read first combine observation of each dataset, then second observations , so on so forth. Its like dataset A have questions data. B has answers data and C has explanation data. The result should be&amp;nbsp; Question, answer and explanation in the order.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;thanks and regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Ash&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 02:13:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207021#M267175</guid>
      <dc:creator>Ashraya</dc:creator>
      <dc:date>2015-06-16T02:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207022#M267176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sort them first and use SET with a BY statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set a b c ;&lt;/P&gt;&lt;P&gt;by num;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or set them first without the BY and then use PROC SORT to order the results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 12:54:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207022#M267176</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-06-16T12:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207023#M267177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll have to add some logical way to order these.&amp;nbsp; This will work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data seta ;&lt;/P&gt;&lt;P&gt;input num var1 $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 abc&lt;/P&gt;&lt;P&gt;4 xyz&lt;/P&gt;&lt;P&gt;5 mno&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data setb ;&lt;/P&gt;&lt;P&gt;input num var1 $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;2 aaa&lt;/P&gt;&lt;P&gt;5 qqq&lt;/P&gt;&lt;P&gt;7 zzz&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data setc ;&lt;/P&gt;&lt;P&gt;input num var1 $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;3 qwe&lt;/P&gt;&lt;P&gt;6 ert&lt;/P&gt;&lt;P&gt;4 rty&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data seta;&lt;/P&gt;&lt;P&gt;set seta;&lt;/P&gt;&lt;P&gt;count +1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data setb;&lt;/P&gt;&lt;P&gt;set setb;&lt;/P&gt;&lt;P&gt;count +1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data setc;&lt;/P&gt;&lt;P&gt;set setc;&lt;/P&gt;&lt;P&gt;count +1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want(drop=count);&lt;/P&gt;&lt;P&gt;set seta setb setc;&lt;/P&gt;&lt;P&gt;by count;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 13:27:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207023#M267177</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-06-16T13:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207024#M267178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A somewhat different approach:&lt;/P&gt;&lt;P&gt;data seta ;&lt;BR /&gt;input num var1 $;&lt;BR /&gt;order=_n_*3;&lt;BR /&gt;cards;&lt;BR /&gt;1 abc&lt;BR /&gt;4 xyz&lt;BR /&gt;5 mno&lt;BR /&gt;;&lt;BR /&gt;run; &lt;/P&gt;&lt;P&gt;data setb ;&lt;BR /&gt;input num var1 $;&lt;BR /&gt;order=_n_*3 +1;&lt;BR /&gt;cards;&lt;BR /&gt;2 aaa&lt;BR /&gt;5 qqq&lt;BR /&gt;7 zzz&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data setc ;&lt;BR /&gt;input num var1 $;&lt;BR /&gt;order=_n_*3+2;&lt;BR /&gt;cards;&lt;BR /&gt;3 qwe&lt;BR /&gt;6 ert&lt;BR /&gt;4 rty&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; merge seta setb setc;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; by order;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; drop order;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 15:57:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207024#M267178</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-06-16T15:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207025#M267179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the datasets all have the same number of observations then you could do this (without any sorting).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set a; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set b; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set c; output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if one or more of the datasets has fewer observations than the others this will stop as soon as it reads past the end of the shortest dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 16:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207025#M267179</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-06-16T16:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207026#M267180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even when the data sets have different numbers of observations, you can program around it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if end1=0 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set a end=end1; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if end2=0 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set b end=end2; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if end3=0 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set c end=end3; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if end1 and end2 and end3 then stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 17:25:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207026#M267180</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-06-16T17:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207027#M267181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or 3XDOW: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;do _n_=1 to 1 while (not end1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set a end=end1;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;do _n_=1 to 1 while (not end2);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set b end=end2;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;do _n_=1 to 1 while (not end3);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set c end=end3;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 18:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207027#M267181</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-06-16T18:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207028#M267182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That won't do what the OP wanted.&amp;nbsp; Instead it does the same thing as :&lt;/P&gt;&lt;P&gt;data want; set a b c; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 18:18:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207028#M267182</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-06-16T18:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207029#M267183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it won't quite work, but for a different reason.&amp;nbsp; I think you will get one extra observation added to the data set at the end, with a message about the data step ending due to looping.&amp;nbsp; (Too busy to test it right now, but that's what I would expect.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 18:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207029#M267183</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-06-16T18:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207030#M267184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Notice '_n_=1 to 1', This time&amp;nbsp; I stand correctly, Tom &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 18:27:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207030#M267184</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-06-16T18:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207031#M267185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right about 'due to looping', not sure how that affects the final results, maybe just performance?&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; class1 class2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; sashelp.class;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; _n_&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; class1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; class2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; _n_=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;to&lt;/SPAN&gt; &lt;SPAN style="color: teal; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;while&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; (not end1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; class2 &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;=end1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; _n_=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;to&lt;/SPAN&gt; &lt;SPAN style="color: teal; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;while&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; (not end2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; class1 &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;=end2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;NOTE: DATA STEP stopped due to looping.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;NOTE: There were 19 observations read from the data set WORK.CLASS2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;NOTE: There were 9 observations read from the data set WORK.CLASS1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;2 The SAS System&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 07:45 Wednesday, June 10, 2015&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;NOTE: The data set WORK.WANT has 28 observations and 5 variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;NOTE: Compressing data set WORK.WANT increased size by 100.00 percent. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Compressed is 2 pages; un-compressed would require 1 pages.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;NOTE: DATA statement used (Total process time):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.02 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;Should have added one of your statements at the end: if end1 and end2 and end3 then stop; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 18:32:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207031#M267185</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-06-16T18:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207032#M267186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right, it's just performance (plus an annoying message).&amp;nbsp; Because of the presence of OUTPUT statements, the program doesn't create that extra record at the end.&amp;nbsp; Contrast that with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;if not eof then set have end=eof;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 18:41:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207032#M267186</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-06-16T18:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207033#M267187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Robert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 18:44:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207033#M267187</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-06-16T18:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207034#M267188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Normally I would code DO _N_ = 1 BY 1 UNTIL(...), so I just assumed you had done the same.&lt;/P&gt;&lt;P&gt;But in that case the _N_=1 to 1 is doing nothing of value.&amp;nbsp; Why not just IF not EOF1 then DO; ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 19:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207034#M267188</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-06-16T19:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207035#M267189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Absolutely, Tom. Mine resulted from the old habit format that DOW usually takes. The sole purpose, as you noted, is to force 'set' only once at a time, otherwise, it would be identical to what Astounding does, which btw is much clearer regarding the programming logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 19:54:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207035#M267189</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-06-16T19:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate the three data sets by its observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207036#M267190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for the replay. it worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 02:44:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-the-three-data-sets-by-its-observation/m-p/207036#M267190</guid>
      <dc:creator>Ashraya</dc:creator>
      <dc:date>2015-06-17T02:44:44Z</dc:date>
    </item>
  </channel>
</rss>

