<?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 with column names and values as new values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose-with-column-names-and-values-as-new-values/m-p/601171#M173843</link>
    <description>&lt;P&gt;I have hundreds of columns each with one value:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;var1 col1 col2 col3 col4
0 'asfds' 'sdfsg' 'sdfsf' 'sdfsdg'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want to proc transpose it so that it looks like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;colname valueincol
col1 'asfds'
col2 'sdfsg'
col3 'sdfsf'
col4 'sdfsdg'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;help?&lt;/P&gt;</description>
    <pubDate>Sat, 02 Nov 2019 21:16:53 GMT</pubDate>
    <dc:creator>serrld113</dc:creator>
    <dc:date>2019-11-02T21:16:53Z</dc:date>
    <item>
      <title>proc transpose with column names and values as new values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose-with-column-names-and-values-as-new-values/m-p/601171#M173843</link>
      <description>&lt;P&gt;I have hundreds of columns each with one value:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;var1 col1 col2 col3 col4
0 'asfds' 'sdfsg' 'sdfsf' 'sdfsdg'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want to proc transpose it so that it looks like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;colname valueincol
col1 'asfds'
col2 'sdfsg'
col3 'sdfsf'
col4 'sdfsdg'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;help?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2019 21:16:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-transpose-with-column-names-and-values-as-new-values/m-p/601171#M173843</guid>
      <dc:creator>serrld113</dc:creator>
      <dc:date>2019-11-02T21:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose with column names and values as new values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose-with-column-names-and-values-as-new-values/m-p/601180#M173847</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input var1 col1 $ col2 $ col3 $ col4 $;
datalines;
0 asfds sdfsg sdfsf sdfsdg
;

proc transpose data=have out=want(rename=(_name_=colname col1=valueincol) drop=var1);
   by var1;
   var col1-col4;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;colname  valueincol 
col1     asfds 
col2     sdfsg 
col3     sdfsf 
col4     sdfsdg 
&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Nov 2019 21:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-transpose-with-column-names-and-values-as-new-values/m-p/601180#M173847</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-02T21:57:36Z</dc:date>
    </item>
  </channel>
</rss>

