<?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 Proc Transpose in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Transpose/m-p/247763#M17558</link>
    <description>&lt;P&gt;I need your help to transpose the data as attached in the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2016 14:59:17 GMT</pubDate>
    <dc:creator>Hi1</dc:creator>
    <dc:date>2016-02-03T14:59:17Z</dc:date>
    <item>
      <title>Proc Transpose</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Transpose/m-p/247763#M17558</link>
      <description>&lt;P&gt;I need your help to transpose the data as attached in the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 14:59:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Transpose/m-p/247763#M17558</guid>
      <dc:creator>Hi1</dc:creator>
      <dc:date>2016-02-03T14:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Transpose/m-p/247764#M17559</link>
      <description>&lt;P&gt;You have a few&amp;nbsp;options (to note, if you want proper code, please post test data in the form of a datastep, we don't have time to type data in from a spreadsheet).&lt;/P&gt;
&lt;P&gt;Proc transpose * 4 one for each of your variables by famid, then merge the resulting datasets back together byfamid&lt;/P&gt;
&lt;P&gt;Eg.&lt;/P&gt;
&lt;P&gt;proc transpose data=have out=want1 prefix=year;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; by famid;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; var year;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;... same again for each variable&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; merge want1-want4;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; by famid;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, Arrays - by group, retainall values, array for each varible output on last row.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 15:15:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Transpose/m-p/247764#M17559</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-02-03T15:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Transpose/m-p/247768#M17560</link>
      <description>&lt;P&gt;For this multiple variable to all wide transpose named by OBS number, I think the easiest method is PROC SUMMARY IDGROUP. You do have to know the maximum number of obs per by group and that can't exceed 100. &amp;nbsp;In other words this work for your example. &amp;nbsp;I suppose you will reveal the full story in time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fam;
   input famid year faminc Age Inc @@;
   cards;
1 96 40000 67 12 1 97 40500 33 44 1 98 41000 59 59 2 96 45000 57 80 2 97 45400 47 59 2 98 45800 49 71 3 96 75000 76 84 3 97 76000 10 48 3 98 77000 22 45
;;;;
   run;
proc print;
   run;
proc summary data=fam;
   by famid;
   output out=wide(drop=_: famid_:) idgroup(out[3](_all_)=);
   run;
proc print;
   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1740i3EFF3583147AF1F8/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 15:20:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Transpose/m-p/247768#M17560</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-02-03T15:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Transpose/m-p/247909#M17564</link>
      <description>&lt;P&gt;Thanks for ur response&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 07:17:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-Transpose/m-p/247909#M17564</guid>
      <dc:creator>Hi1</dc:creator>
      <dc:date>2016-02-04T07:17:03Z</dc:date>
    </item>
  </channel>
</rss>

