<?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: Proc Transpose character numeric issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-character-numeric-issue/m-p/567160#M159461</link>
    <description>&lt;P&gt;I don't think so. Perhaps simply do it in a data step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input byvar a b c;
cards;
1 100 200 300
2 400 500 600
;
run;

data want(keep=byvar name Value);
   set have;
   array _{3} a b c;
   do i=1 to dim(_);
      name=vname(_[i]);
      Value=put(_[i], 8. -l);
      output;
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 19 Jun 2019 07:52:51 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-06-19T07:52:51Z</dc:date>
    <item>
      <title>Proc Transpose character numeric issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-character-numeric-issue/m-p/567153#M159459</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input byvar a b c;
cards;
1 100 200 300
2 400 500 600
;
run;

proc sort data=have;
by byvar;
run; 
                                                                                   
proc transpose data=have 
				out=want(keep=byvar _name_ Value1 rename=(_name_=var_name Value1=Value))
				prefix=Value;
  by byvar;                                                                          
  var a b c;                                                      
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can we have the datatype of column "Value" in "want" table set to character datatype during transpose?&lt;/P&gt;&lt;P&gt;If we have a mixed datatype in the input "have" table it is working fine.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 07:10:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-character-numeric-issue/m-p/567153#M159459</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2019-06-19T07:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose character numeric issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-character-numeric-issue/m-p/567160#M159461</link>
      <description>&lt;P&gt;I don't think so. Perhaps simply do it in a data step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input byvar a b c;
cards;
1 100 200 300
2 400 500 600
;
run;

data want(keep=byvar name Value);
   set have;
   array _{3} a b c;
   do i=1 to dim(_);
      name=vname(_[i]);
      Value=put(_[i], 8. -l);
      output;
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Jun 2019 07:52:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-character-numeric-issue/m-p/567160#M159461</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-06-19T07:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose character numeric issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-character-numeric-issue/m-p/567548#M159612</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138619"&gt;@Satish_Parida&lt;/a&gt;&amp;nbsp;did you try my code and did it work for you? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 07:39:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Transpose-character-numeric-issue/m-p/567548#M159612</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-06-20T07:39:44Z</dc:date>
    </item>
  </channel>
</rss>

