<?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: Long-to-Wide handling duplicates using array processing in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Long-to-Wide-handling-duplicates-using-array-processing/m-p/134378#M1219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do not use variable D , make a new variable for that purpose.&lt;/P&gt;&lt;P&gt;Not tested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: navy; background-position: initial;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; transposed (drop=A B C D) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; AA {*} $ A1-A7;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; BB {*} $ B1-B7;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; CC {*} $ C1-C7;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;n=0;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;do&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;until&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; (last.X);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; text-indent: 0.5in; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; rawdata;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; X;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;&amp;nbsp; n+1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;&amp;nbsp; aa(n)= a;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;&amp;nbsp; bb(n)=b;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;&amp;nbsp; cc(n)=c;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: navy; background-position: initial;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Dec 2014 09:39:20 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2014-12-14T09:39:20Z</dc:date>
    <item>
      <title>Long-to-Wide handling duplicates using array processing</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Long-to-Wide-handling-duplicates-using-array-processing/m-p/134375#M1216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;I was transposing my data from Long to Wide.&amp;nbsp; It works for most of my data, except for on variable that has duplicates not cleared by the by statement. X=7 and A=W have two observations B=o and B=p.&amp;nbsp; I know that the array I have written selects the last line where X=7 A=W B=p and does not include the the other X=7 A=W.&amp;nbsp; Is there a way to write the code to include both B=o and B=p without creating multiple X's either rewriting the DO statement or something else?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE height="624" style="height: 622px; width: 366px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;q&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;ts&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;q&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;ts&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;r&lt;/TD&gt;&lt;TD&gt;p&lt;/TD&gt;&lt;TD&gt;ts&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;q&lt;/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&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; transposed (drop=A B C D) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; AA {*} $ A1-A7;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; BB {*} $ B1-B7;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; CC {*} $ C1-C7;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;until&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (last.X);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; rawdata;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; X;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp; aa(d)= a;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp; bb(d)=b;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp; cc(d)=c;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: navy; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2014 16:50:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Long-to-Wide-handling-duplicates-using-array-processing/m-p/134375#M1216</guid>
      <dc:creator>mtsasuser</dc:creator>
      <dc:date>2014-12-03T16:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Long-to-Wide handling duplicates using array processing</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Long-to-Wide-handling-duplicates-using-array-processing/m-p/134376#M1217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I haven't had a chance to look at your code.&lt;/P&gt;&lt;P&gt;It looks like you might get better input from this community: &lt;A __default_attr="31" __jive_macro_name="community" class="jive_macro jive_macro_community" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 14:51:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Long-to-Wide-handling-duplicates-using-array-processing/m-p/134376#M1217</guid>
      <dc:creator>M_Maldonado</dc:creator>
      <dc:date>2014-12-09T14:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Long-to-Wide handling duplicates using array processing</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Long-to-Wide-handling-duplicates-using-array-processing/m-p/134377#M1218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you need to replace the variable D with a better version that changes to "3" on the final observation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by X;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if first.X then d_new = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else d_new + 1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use D_NEW instead of D to transpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 15:05:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Long-to-Wide-handling-duplicates-using-array-processing/m-p/134377#M1218</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-12-09T15:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Long-to-Wide handling duplicates using array processing</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Long-to-Wide-handling-duplicates-using-array-processing/m-p/134378#M1219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do not use variable D , make a new variable for that purpose.&lt;/P&gt;&lt;P&gt;Not tested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: navy; background-position: initial;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; transposed (drop=A B C D) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; AA {*} $ A1-A7;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; BB {*} $ B1-B7;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; CC {*} $ C1-C7;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;n=0;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;do&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;until&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; (last.X);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; text-indent: 0.5in; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; rawdata;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; X;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;&amp;nbsp; n+1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;&amp;nbsp; aa(n)= a;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;&amp;nbsp; bb(n)=b;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;&amp;nbsp; cc(n)=c;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: navy; background-position: initial;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 09:39:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Long-to-Wide-handling-duplicates-using-array-processing/m-p/134378#M1219</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-12-14T09:39:20Z</dc:date>
    </item>
  </channel>
</rss>

