<?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: Change data format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Change-data-format/m-p/458539#M284528</link>
    <description>sorry ! the format should be a format below:&lt;BR /&gt;&lt;BR /&gt;ID cp resp_a resp_b&lt;BR /&gt;&lt;BR /&gt;1 1 0.1 0.3&lt;BR /&gt;&lt;BR /&gt;1 2 0.5 0.2&lt;BR /&gt;&lt;BR /&gt;2 1 0.15 0.8&lt;BR /&gt;&lt;BR /&gt;2 2 0.7 0.4</description>
    <pubDate>Mon, 30 Apr 2018 07:42:49 GMT</pubDate>
    <dc:creator>Lijuu</dc:creator>
    <dc:date>2018-04-30T07:42:49Z</dc:date>
    <item>
      <title>Change data format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-data-format/m-p/458538#M284527</link>
      <description>&lt;P&gt;How can i change a data in wide format for the following data format by source.&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp;source&amp;nbsp; cp&amp;nbsp; &amp;nbsp; &amp;nbsp; resp&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.1&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.5&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.3&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.2&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.15&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.7&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.8&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.4&lt;/P&gt;&lt;P&gt;into a format&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; cp&amp;nbsp; &amp;nbsp; resp_a&amp;nbsp; resp_b&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.5&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.3&amp;nbsp; &amp;nbsp; &amp;nbsp; 0.2&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.15&amp;nbsp; &amp;nbsp; 0.7&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.8&amp;nbsp; &amp;nbsp; &amp;nbsp; 0.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 07:38:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-data-format/m-p/458538#M284527</guid>
      <dc:creator>Lijuu</dc:creator>
      <dc:date>2018-04-30T07:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Change data format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-data-format/m-p/458539#M284528</link>
      <description>sorry ! the format should be a format below:&lt;BR /&gt;&lt;BR /&gt;ID cp resp_a resp_b&lt;BR /&gt;&lt;BR /&gt;1 1 0.1 0.3&lt;BR /&gt;&lt;BR /&gt;1 2 0.5 0.2&lt;BR /&gt;&lt;BR /&gt;2 1 0.15 0.8&lt;BR /&gt;&lt;BR /&gt;2 2 0.7 0.4</description>
      <pubDate>Mon, 30 Apr 2018 07:42:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-data-format/m-p/458539#M284528</guid>
      <dc:creator>Lijuu</dc:creator>
      <dc:date>2018-04-30T07:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Change data format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-data-format/m-p/458545#M284529</link>
      <description>&lt;P&gt;You can use proc tranpose for that, very simple:&lt;/P&gt;
&lt;PRE&gt;proc tranpose data=have out=want prefix=resp_;
  by id cp;
  var resp;
  id source;
run;&lt;/PRE&gt;
&lt;P&gt;Note assumes sorted by the by variables.&amp;nbsp; Post test data in the form of a datastep next time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, unless this is for a report output, it is really not recommended to program in this way, it will make all your program from that point on much harder, and you have increased the difficulty even more by affixing a character as the end, thus you will struggle to even use lists and such like, e.g. var1, var2, can be a list of var:.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 08:01:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-data-format/m-p/458545#M284529</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-04-30T08:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Change data format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-data-format/m-p/458554#M284530</link>
      <description>Dear! Thank you. I will do after this time for the point what you advice me to do!&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Apr 2018 08:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-data-format/m-p/458554#M284530</guid>
      <dc:creator>Lijuu</dc:creator>
      <dc:date>2018-04-30T08:19:29Z</dc:date>
    </item>
  </channel>
</rss>

