<?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: Data Manipulation in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Data-Manipulation/m-p/18667#M3707</link>
    <description>You just need some basic data step programming, using assignment and OUTPUT statements. Not having looked into it in detail, I guess that PROC TRANSPOSE could be an option too.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
    <pubDate>Wed, 15 Apr 2009 11:20:50 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2009-04-15T11:20:50Z</dc:date>
    <item>
      <title>Data Manipulation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-Manipulation/m-p/18664#M3704</link>
      <description>I got a set of data which looks like&lt;BR /&gt;
Date   company1 _price    Date1         company2_price&lt;BR /&gt;
1           23                         1                     10&lt;BR /&gt;
2          12                          2                     11&lt;BR /&gt;
3           11                         3                     15&lt;BR /&gt;
4           15                         4                     16&lt;BR /&gt;
5           17                         5                     17&lt;BR /&gt;
6           18                         6                     18&lt;BR /&gt;
&lt;BR /&gt;
I wanna transfer it to the form of&lt;BR /&gt;
&lt;BR /&gt;
Date        Company                 Price(as above)&lt;BR /&gt;
  1              company1                  23&lt;BR /&gt;
  2                   1                           12 &lt;BR /&gt;
  3                   1                            11&lt;BR /&gt;
  4                   1 &lt;BR /&gt;
  5                   1&lt;BR /&gt;
  6                   1&lt;BR /&gt;
  1                   2&lt;BR /&gt;
  2                   2 &lt;BR /&gt;
  3                   2&lt;BR /&gt;
  4                  2&lt;BR /&gt;
  5                  2&lt;BR /&gt;
  6                 2&lt;BR /&gt;
&lt;BR /&gt;
It would be really appreciated if someone could help out.&lt;BR /&gt;
Thanks..</description>
      <pubDate>Wed, 15 Apr 2009 02:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-Manipulation/m-p/18664#M3704</guid>
      <dc:creator>Fred_Gavin</dc:creator>
      <dc:date>2009-04-15T02:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Data Manipulation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-Manipulation/m-p/18665#M3705</link>
      <description>Very confusing to me...&lt;BR /&gt;
&lt;BR /&gt;
Could you please detail the transformation?!&lt;BR /&gt;
&lt;BR /&gt;
Greetings from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos at &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Wed, 15 Apr 2009 07:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-Manipulation/m-p/18665#M3705</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2009-04-15T07:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Data Manipulation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-Manipulation/m-p/18666#M3706</link>
      <description>Hi Daniel,&lt;BR /&gt;
Thanks for your reply. &lt;BR /&gt;
&lt;BR /&gt;
In the original data, the each company consists of two columns, the first colum is date and second one is its share price. So for example, if there are three companies, the original looks like&lt;BR /&gt;
&lt;BR /&gt;
Date Company1_Price Date Company2_Price Date Company3_Price&lt;BR /&gt;
 1       $12         1        $15         1  &lt;BR /&gt;
 2                   2                    2&lt;BR /&gt;
 3                   3                    3&lt;BR /&gt;
(for each company, dates are the same)&lt;BR /&gt;
 &lt;BR /&gt;
Now i want to transfer it to the following form&lt;BR /&gt;
&lt;BR /&gt;
Date  Firm       Price&lt;BR /&gt;
 1    company1&lt;BR /&gt;
 2    company1&lt;BR /&gt;
 3    company1&lt;BR /&gt;
 1    company2&lt;BR /&gt;
 2    company2&lt;BR /&gt;
 3    company2&lt;BR /&gt;
 1    company3&lt;BR /&gt;
 2    company3&lt;BR /&gt;
 3    company3</description>
      <pubDate>Wed, 15 Apr 2009 08:27:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-Manipulation/m-p/18666#M3706</guid>
      <dc:creator>Fred_Gavin</dc:creator>
      <dc:date>2009-04-15T08:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Data Manipulation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Data-Manipulation/m-p/18667#M3707</link>
      <description>You just need some basic data step programming, using assignment and OUTPUT statements. Not having looked into it in detail, I guess that PROC TRANSPOSE could be an option too.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Wed, 15 Apr 2009 11:20:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Data-Manipulation/m-p/18667#M3707</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2009-04-15T11:20:50Z</dc:date>
    </item>
  </channel>
</rss>

