<?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 didn't work? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-didn-t-work/m-p/867242#M342499</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have a sample dataset below.&amp;nbsp; Two questions; first, the ")" are missing in all the data lines, not sure how to fix it;&amp;nbsp; second, my Proc transpose codes are not working. Please help; thanks.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Mean_Median_Output;
input House 1.0 LOS_Mean_Q1Q3 $ LOS_Median_range $ Age_Mean_Q1Q3 $ Age_Median_range $;
infile datalines delimiter='/';
datalines;
0/2.2 (1-2)/1.0 (0-92)/3.7 (2-4)/2.0 (2-17)/
1/2.9 (1-3)/2.0 (0-117)/6.6 (3-9)/5.0 (2-17)/
;
run;

Proc transpose data=Mean_Median_Output out=Mean_Median_transpose prefix=House_; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 30 Mar 2023 13:22:10 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2023-03-30T13:22:10Z</dc:date>
    <item>
      <title>Proc transpose didn't work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-didn-t-work/m-p/867242#M342499</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have a sample dataset below.&amp;nbsp; Two questions; first, the ")" are missing in all the data lines, not sure how to fix it;&amp;nbsp; second, my Proc transpose codes are not working. Please help; thanks.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Mean_Median_Output;
input House 1.0 LOS_Mean_Q1Q3 $ LOS_Median_range $ Age_Mean_Q1Q3 $ Age_Median_range $;
infile datalines delimiter='/';
datalines;
0/2.2 (1-2)/1.0 (0-92)/3.7 (2-4)/2.0 (2-17)/
1/2.9 (1-3)/2.0 (0-117)/6.6 (3-9)/5.0 (2-17)/
;
run;

Proc transpose data=Mean_Median_Output out=Mean_Median_transpose prefix=House_; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Mar 2023 13:22:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-didn-t-work/m-p/867242#M342499</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2023-03-30T13:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose didn't work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-didn-t-work/m-p/867243#M342500</link>
      <description>&lt;P&gt;Variables defaults to 8 in lenght, specifying a length of 9 should fix the truncation problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is your specific problem with PROC TRANSPOSE?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 13:33:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-didn-t-work/m-p/867243#M342500</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-03-30T13:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose didn't work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-didn-t-work/m-p/867246#M342502</link>
      <description>&lt;P&gt;For missing ")"&amp;nbsp; - set proper variable LENGTH:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Mean_Median_Output;
LENGTH House 8 LOS_Mean_Q1Q3 LOS_Median_range Age_Mean_Q1Q3 Age_Median_range $ 30;
input House 1.0 LOS_Mean_Q1Q3 $ LOS_Median_range $ Age_Mean_Q1Q3 $ Age_Median_range $;
infile datalines delimiter='/';
datalines;
0/2.2 (1-2)/1.0 (0-92)/3.7 (2-4)/2.0 (2-17)/
1/2.9 (1-3)/2.0 (0-117)/6.6 (3-9)/5.0 (2-17)/
;
run;
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For transpose - what output do you expect to get?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 13:35:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-didn-t-work/m-p/867246#M342502</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-03-30T13:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose didn't work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-didn-t-work/m-p/867249#M342505</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use a LENGTH statement or informats (as shown in the example below) to specify sufficient lengths for your character variables. Just using the dollar sign in the INPUT statement means a default length of 8 bytes.&lt;/P&gt;
&lt;PRE&gt;input House (LOS_Mean_Q1Q3 LOS_Median_range Age_Mean_Q1Q3 Age_Median_range) (:$13.);&lt;/PRE&gt;
&lt;P&gt;I &lt;EM&gt;guess&lt;/EM&gt; that you want to add these ID and VAR statements to your PROC TRANSPOSE step:&lt;/P&gt;
&lt;PRE&gt;proc transpose data=Mean_Median_Output out=Mean_Median_transpose prefix=House_;
&lt;STRONG&gt;&lt;FONT color="#3366FF"&gt;id house;
var _char_;&lt;/FONT&gt;&lt;/STRONG&gt;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Mar 2023 13:41:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-didn-t-work/m-p/867249#M342505</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-03-30T13:41:13Z</dc:date>
    </item>
  </channel>
</rss>

