<?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: Transpose a single column. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36930#M7277</link>
    <description>When you truly have a code problem, it is best to share the SAS code attempted and ideally any SAS log output with PUTLOG and other pertinent output diagnostics for forum subscriber feedback.  Since attachments are not permitted, you can paste data/information directly into you forum post/reply as a communication means.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Wed, 27 May 2009 12:23:05 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-05-27T12:23:05Z</dc:date>
    <item>
      <title>Transpose a single column.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36926#M7273</link>
      <description>My table has only one variable, Var1, with 3 observations. The table looks like this:&lt;BR /&gt;
&lt;BR /&gt;
Var1&lt;BR /&gt;
qwer&lt;BR /&gt;
asdf&lt;BR /&gt;
zxcv &lt;BR /&gt;
&lt;BR /&gt;
I want the table to have one single row(observation) like this:&lt;BR /&gt;
&lt;BR /&gt;
Col1 Col2 Col3&lt;BR /&gt;
qwer asdf zxcv&lt;BR /&gt;
&lt;BR /&gt;
I have tried with PROC TRANSPOSE in different ways, but haven't succeeded.&lt;BR /&gt;
&lt;BR /&gt;
The examples I have found are more complicated and can't be applied to this &lt;B&gt;simple&lt;/B&gt; situation.&lt;BR /&gt;
&lt;BR /&gt;
Susan</description>
      <pubDate>Wed, 27 May 2009 08:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36926#M7273</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-27T08:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose a single column.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36927#M7274</link>
      <description>Do you want a generic solution that will transpose all rows in table independent of number of rows? If you just want to transpose this three row table, just use a data step with assignment statements and explicit output. A generic solution would contain a step the figure out number of rows, and building an array to assign the row values to.&lt;BR /&gt;
&lt;BR /&gt;
Maybe you could use PROC TRANSPOSE, but I'm always find myself frustrated when using it, because I can't understand how the different options/statements interact, it feels less logical to me than other procedures.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Wed, 27 May 2009 09:11:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36927#M7274</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2009-05-27T09:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose a single column.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36928#M7275</link>
      <description>I am almost new to SAS.&lt;BR /&gt;
&lt;BR /&gt;
I know the number of rows(observations of Var1) in my one column table, but I don't know the values in advance.&lt;BR /&gt;
&lt;BR /&gt;
I don't think there are any indexes on a variable in a SAS table.&lt;BR /&gt;
&lt;BR /&gt;
If it had been, I could have assigned Col1=Var1(1); Col2=Var1(2); Col3=Var1(3);.&lt;BR /&gt;
&lt;BR /&gt;
Susan</description>
      <pubDate>Wed, 27 May 2009 09:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36928#M7275</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-27T09:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose a single column.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36929#M7276</link>
      <description>Simple code that works:&lt;BR /&gt;
&lt;BR /&gt;
data have;&lt;BR /&gt;
input Var1 $;&lt;BR /&gt;
datalines;&lt;BR /&gt;
qwer&lt;BR /&gt;
asdf&lt;BR /&gt;
zxcv &lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc transpose data=have out=want (drop=_name_);&lt;BR /&gt;
var var1;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 27 May 2009 12:19:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36929#M7276</guid>
      <dc:creator>ieva</dc:creator>
      <dc:date>2009-05-27T12:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose a single column.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36930#M7277</link>
      <description>When you truly have a code problem, it is best to share the SAS code attempted and ideally any SAS log output with PUTLOG and other pertinent output diagnostics for forum subscriber feedback.  Since attachments are not permitted, you can paste data/information directly into you forum post/reply as a communication means.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 27 May 2009 12:23:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36930#M7277</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-05-27T12:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose a single column.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36931#M7278</link>
      <description>Thank you very much, &lt;B&gt;ieva&lt;/B&gt;.&lt;BR /&gt;
&lt;BR /&gt;
I &lt;B&gt;"knew"&lt;/B&gt; it had to be a simple solution.&lt;BR /&gt;
&lt;BR /&gt;
Susan</description>
      <pubDate>Wed, 27 May 2009 12:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-a-single-column/m-p/36931#M7278</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-27T12:39:27Z</dc:date>
    </item>
  </channel>
</rss>

