<?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 in one step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/transpose-in-one-step/m-p/107157#M22317</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use YYQ informat and format to read those values into actual dates and redisplay them at the same level of precision.&lt;/P&gt;&lt;P&gt;The dates will be stored as the first day of the quarter. So 1952Q1 will be stored as '01JAN1952'd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data test22 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; infile 'test22.csv' dsd dlm=',' truncover firstobs=2 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input date s1 s2 premium smb ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; informat date yyq6.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; format date yyq6.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 23 Dec 2012 14:38:18 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2012-12-23T14:38:18Z</dc:date>
    <item>
      <title>transpose in one step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transpose-in-one-step/m-p/107154#M22314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The original data is test22.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I'm using 9.1, always have problem with informat and format date. By import, SAS reads it as character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. How can I transpose test22 to test24.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Dec 2012 18:39:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transpose-in-one-step/m-p/107154#M22314</guid>
      <dc:creator>econfkw</dc:creator>
      <dc:date>2012-12-22T18:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: transpose in one step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transpose-in-one-step/m-p/107155#M22315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What that you want to "transpose"? &lt;/P&gt;&lt;P&gt;Do the empty rows at the end of test22.csv have any meaning?&lt;/P&gt;&lt;P&gt;Looks like you want to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data test24; set test22;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; s=1 ; return=s1; output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; s=2 ; return=s2; output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; drop s1 s2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;test22.csv&lt;/STRONG&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Date,s1,s2,premium,smb&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q1,-1.171800189,-1.77499335,3.22,-2.74&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q2,-10.25698639,-1.812109541,1.85,-2.08&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q3,-3.994618175,0.55753206,-1.9,1.96&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q4,-1.262761712,2.255299066,8.34,-3.32&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;,,,,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;,,,,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;,,,,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;,,,,&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;test24.csv&lt;/STRONG&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Date,s,return,premium,smb&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q1,1,-1.171800189,3.22,-2.74&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q1,2,-1.77499335,3.22,-2.74&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q2,1,-10.25698639,1.85,-2.08&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q2,2,-1.812109541,1.85,-2.08&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q3,1,-3.994618175,-1.9,1.96&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q3,2,0.55753206,-1.9,1.96&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q4,1,-1.262761712,8.34,-3.32&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1952Q4,2,2.255299066,8.34,-3.32&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Dec 2012 18:59:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transpose-in-one-step/m-p/107155#M22315</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-12-22T18:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: transpose in one step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transpose-in-one-step/m-p/107156#M22316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, the dots have no meaning. Your code does work. I have s1-s25, I think a do loop may work.&lt;/P&gt;&lt;P&gt;Anyhow, regarding question 1, how can I informat the date variable as date instead of character?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2012 05:09:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transpose-in-one-step/m-p/107156#M22316</guid>
      <dc:creator>econfkw</dc:creator>
      <dc:date>2012-12-23T05:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: transpose in one step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transpose-in-one-step/m-p/107157#M22317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use YYQ informat and format to read those values into actual dates and redisplay them at the same level of precision.&lt;/P&gt;&lt;P&gt;The dates will be stored as the first day of the quarter. So 1952Q1 will be stored as '01JAN1952'd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data test22 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; infile 'test22.csv' dsd dlm=',' truncover firstobs=2 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input date s1 s2 premium smb ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; informat date yyq6.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; format date yyq6.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2012 14:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transpose-in-one-step/m-p/107157#M22317</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-12-23T14:38:18Z</dc:date>
    </item>
  </channel>
</rss>

