<?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: Modify Table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/261195#M50773</link>
    <description>Thanks a lot</description>
    <pubDate>Mon, 04 Apr 2016 18:47:50 GMT</pubDate>
    <dc:creator>alexandralorenzo</dc:creator>
    <dc:date>2016-04-04T18:47:50Z</dc:date>
    <item>
      <title>Modify Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/260375#M50519</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an example of my problem I have this dataset:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;john 1 2 3&lt;/P&gt;&lt;P&gt;alex 2 5 6&lt;/P&gt;&lt;P&gt;tito 1 2 6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I want this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;john 1&lt;/P&gt;&lt;P&gt;john 2&lt;/P&gt;&lt;P&gt;john 3&lt;/P&gt;&lt;P&gt;alex 2&lt;/P&gt;&lt;P&gt;alex 5&lt;/P&gt;&lt;P&gt;alex 6&lt;/P&gt;&lt;P&gt;tito 1&lt;/P&gt;&lt;P&gt;tito 2&lt;/P&gt;&lt;P&gt;tito 6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have any idea ( of course I have 100 hundred columns this is just an example).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 12:17:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/260375#M50519</guid>
      <dc:creator>alexandralorenzo</dc:creator>
      <dc:date>2016-03-31T12:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/260379#M50520</link>
      <description>Try Proc Transpose or a data step using arrays. &lt;BR /&gt;&lt;BR /&gt;If you need examples google 'ucla wide to long' or search on here. &lt;BR /&gt;</description>
      <pubDate>Thu, 31 Mar 2016 12:25:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/260379#M50520</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-31T12:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/260385#M50522</link>
      <description>&lt;PRE&gt;data have;
  a="john"; v1=1; v2=2; v3=3;
run;
proc transpose data=have out=want;
  by a;
  var v:;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Mar 2016 12:48:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/260385#M50522</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-31T12:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/260407#M50528</link>
      <description>&lt;P&gt;Hello Alexandra,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;data have;&lt;BR /&gt;input name $ x y z;&lt;BR /&gt;cards;&lt;BR /&gt;john 1 2 3&lt;BR /&gt;alex 2 5 6&lt;BR /&gt;tito 1 2 6&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;array oldvar x--z;&lt;BR /&gt;do _i=1 to dim(oldvar);&lt;BR /&gt;  value=oldvar[_i];&lt;BR /&gt;  output;&lt;BR /&gt;end;&lt;BR /&gt;keep name value;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;If your variables x, y, z (etc.) are character variables, please define the length of new variable VALUE appropriately using a LENGTH statement. If some are numeric and others are character and you want to have all values in a single character&amp;nbsp;variable&amp;nbsp;VALUE, you have to create two arrays (one for the numeric, one for the character variables) and convert the numeric values to character values by means of the PUT function in the assignment statement (&lt;FONT face="courier new,courier"&gt;value=&lt;/FONT&gt;...) of one of (then) two DO loops.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 13:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/260407#M50528</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-03-31T13:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/261195#M50773</link>
      <description>Thanks a lot</description>
      <pubDate>Mon, 04 Apr 2016 18:47:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/261195#M50773</guid>
      <dc:creator>alexandralorenzo</dc:creator>
      <dc:date>2016-04-04T18:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/261197#M50774</link>
      <description>The problem with proc transpose that you need a proc sort and take a long time &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:49:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modify-Table/m-p/261197#M50774</guid>
      <dc:creator>alexandralorenzo</dc:creator>
      <dc:date>2016-04-04T18:49:06Z</dc:date>
    </item>
  </channel>
</rss>

