<?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: Help Please Concatenate and interleaving in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-Please-Concatenate-and-interleaving/m-p/313367#M68082</link>
    <description>&lt;P&gt;I'm not sure that I understand the term "cake brand" but you can check next code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data Duncan;&lt;BR /&gt;length flavor $15;&lt;BR /&gt;infile datalines dlm=',' truncover;&lt;BR /&gt;input flavor $ height;&lt;BR /&gt;datalines;&lt;BR /&gt;Devil's food ,39&lt;BR /&gt;Devil's food ,36.5&lt;BR /&gt;White ,30.5&lt;BR /&gt;White ,34.5&lt;BR /&gt;Yellow , 37.0&lt;BR /&gt;Yellow , 35.0&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data Betty;&lt;BR /&gt;length flavor $15;&lt;BR /&gt;infile datalines dlm=',' truncover;&lt;BR /&gt;input flavor $ height;&lt;BR /&gt;datalines;&lt;BR /&gt;Devil's food ,35.5&lt;BR /&gt;Devil's food ,36.0&lt;BR /&gt;White ,35.5&lt;BR /&gt;White ,37.5&lt;BR /&gt;Yellow , 32.5&lt;BR /&gt;Yellow , 32.5&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data all;&lt;BR /&gt; set duncan&lt;BR /&gt; betty indsname=_dsn;&lt;BR /&gt; by flavor; &lt;BR /&gt; brand = scan(_dsn,2,'.');&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title 'Duncan &amp;amp; Betty results';&lt;/P&gt;
&lt;P&gt;proc print data=all;&lt;/P&gt;
&lt;P&gt;var brand flavor height;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2016 07:27:01 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2016-11-22T07:27:01Z</dc:date>
    <item>
      <title>Help Please Concatenate and interleaving</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-Please-Concatenate-and-interleaving/m-p/313356#M68077</link>
      <description>&lt;P&gt;I have attached a screenshot of the question. Please help me figure this out, i'm very lost.&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13164iFE0DE36E5A7BBED7/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Screen Shot 2016-11-22 at 12.24.03 AM.png" title="Screen Shot 2016-11-22 at 12.24.03 AM.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13165iF986EF8F1CD265FA/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Screen Shot 2016-11-22 at 12.24.03 AM.png" title="Screen Shot 2016-11-22 at 12.24.03 AM.png" /&gt;</description>
      <pubDate>Tue, 22 Nov 2016 05:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-Please-Concatenate-and-interleaving/m-p/313356#M68077</guid>
      <dc:creator>nrb</dc:creator>
      <dc:date>2016-11-22T05:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help Please Concatenate and interleaving</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-Please-Concatenate-and-interleaving/m-p/313361#M68079</link>
      <description>&lt;P&gt;1. read the source data using 2 data steps&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data&amp;nbsp;table1;&lt;/P&gt;
&lt;P&gt;infile datalines ..&lt;/P&gt;
&lt;P&gt;input ...&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;your data&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Concatenate&lt;/P&gt;
&lt;P&gt;Either use Proc Append or a third data step&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Interleaving&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First sort your data sets by Flavor&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here the detailed docu with code examples of how you can combine SAS data sets&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/viewer.htm#p15jvywi5avt3cn1bee8r6c33ux1.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/viewer.htm#p15jvywi5avt3cn1bee8r6c33ux1.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 05:55:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-Please-Concatenate-and-interleaving/m-p/313361#M68079</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-11-22T05:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help Please Concatenate and interleaving</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-Please-Concatenate-and-interleaving/m-p/313367#M68082</link>
      <description>&lt;P&gt;I'm not sure that I understand the term "cake brand" but you can check next code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data Duncan;&lt;BR /&gt;length flavor $15;&lt;BR /&gt;infile datalines dlm=',' truncover;&lt;BR /&gt;input flavor $ height;&lt;BR /&gt;datalines;&lt;BR /&gt;Devil's food ,39&lt;BR /&gt;Devil's food ,36.5&lt;BR /&gt;White ,30.5&lt;BR /&gt;White ,34.5&lt;BR /&gt;Yellow , 37.0&lt;BR /&gt;Yellow , 35.0&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data Betty;&lt;BR /&gt;length flavor $15;&lt;BR /&gt;infile datalines dlm=',' truncover;&lt;BR /&gt;input flavor $ height;&lt;BR /&gt;datalines;&lt;BR /&gt;Devil's food ,35.5&lt;BR /&gt;Devil's food ,36.0&lt;BR /&gt;White ,35.5&lt;BR /&gt;White ,37.5&lt;BR /&gt;Yellow , 32.5&lt;BR /&gt;Yellow , 32.5&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data all;&lt;BR /&gt; set duncan&lt;BR /&gt; betty indsname=_dsn;&lt;BR /&gt; by flavor; &lt;BR /&gt; brand = scan(_dsn,2,'.');&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title 'Duncan &amp;amp; Betty results';&lt;/P&gt;
&lt;P&gt;proc print data=all;&lt;/P&gt;
&lt;P&gt;var brand flavor height;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 07:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-Please-Concatenate-and-interleaving/m-p/313367#M68082</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-11-22T07:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help Please Concatenate and interleaving</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-Please-Concatenate-and-interleaving/m-p/313445#M68114</link>
      <description>Duncan Hines and Betty Crocker are two brands of cake mix in the US.&lt;BR /&gt;MK</description>
      <pubDate>Tue, 22 Nov 2016 12:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-Please-Concatenate-and-interleaving/m-p/313445#M68114</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2016-11-22T12:29:50Z</dc:date>
    </item>
  </channel>
</rss>

