<?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 with continues dates in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose-with-continues-dates/m-p/33577#M8125</link>
    <description>Using a DATA step, setup an ARRAY referencing the range of mnths, and generate a SAS numeric (DATE) variable using the INTNX function and decrement in a DO / END loop using DIM(&lt;ARRAYNAME&gt; TO 1 BY -1.  Output a new observation with each DO loop pass, thereby creating a vertical representation of your transposed data.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;/ARRAYNAME&gt;</description>
    <pubDate>Mon, 18 May 2009 21:05:06 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-05-18T21:05:06Z</dc:date>
    <item>
      <title>proc transpose with continues dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose-with-continues-dates/m-p/33576#M8124</link>
      <description>I have rearranged my data with simple proc transpose. But my catch is that one of my column headings is month/year combination.&lt;BR /&gt;
&lt;BR /&gt;
So my data originally looked like this : &lt;BR /&gt;
WHERE mths1....mths37 is month/year that was calculated via array so for this month mths1 is May2006, mths2= June 2006 etc until mths 37=May 2009. These mths will change every month...so in June 2009 , my mths1 =June2006, mths2=July2006...until mths37=June2009.&lt;BR /&gt;
So my proc transpose is easy until I got to "rename" my mths1 - mths37" &lt;BR /&gt;
This ir original data set &lt;BR /&gt;
company     mths1 mths2 mths3 etc&lt;BR /&gt;
589                5       4           3  &lt;BR /&gt;
590               6          7         8&lt;BR /&gt;
&lt;BR /&gt;
what I got with with a simple step&lt;BR /&gt;
proc summary data=dataset;&lt;BR /&gt;
var mths1-mths37;&lt;BR /&gt;
by company;&lt;BR /&gt;
output out=finout (DROP=_TYPE_ _FREQ_) SUM=;&lt;BR /&gt;
             company 589       company 590&lt;BR /&gt;
mths1     5                              6&lt;BR /&gt;
mths2        4                           7&lt;BR /&gt;
mths3        3                          8&lt;BR /&gt;
&lt;BR /&gt;
What I am looking for is to have a code that will do following&lt;BR /&gt;
&lt;BR /&gt;
             company 589       company 590&lt;BR /&gt;
May06     5                              6&lt;BR /&gt;
June06       4                           7&lt;BR /&gt;
July06      3                          8&lt;BR /&gt;
etc&lt;BR /&gt;
May2009 2                         3&lt;BR /&gt;
&lt;BR /&gt;
and next month it would be same as above but it will start left column with June 06 &amp;amp; go down until June 2009.&lt;BR /&gt;
&lt;BR /&gt;
I am not sure if this is to complicated for forum or I have to create a ticket. But maybe someone could give me some hints, little push to automize that .Thanks a lot.</description>
      <pubDate>Mon, 18 May 2009 20:48:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose-with-continues-dates/m-p/33576#M8124</guid>
      <dc:creator>Karo_22</dc:creator>
      <dc:date>2009-05-18T20:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose with continues dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose-with-continues-dates/m-p/33577#M8125</link>
      <description>Using a DATA step, setup an ARRAY referencing the range of mnths, and generate a SAS numeric (DATE) variable using the INTNX function and decrement in a DO / END loop using DIM(&lt;ARRAYNAME&gt; TO 1 BY -1.  Output a new observation with each DO loop pass, thereby creating a vertical representation of your transposed data.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;/ARRAYNAME&gt;</description>
      <pubDate>Mon, 18 May 2009 21:05:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose-with-continues-dates/m-p/33577#M8125</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-05-18T21:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose with continues dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose-with-continues-dates/m-p/33578#M8126</link>
      <description>Have a look at the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website and using the SEARCH facility you will find SAS technical papers and also DOC references.  Also, here is a Google advanced search argument (limited to the SAS.COM site) that identifies several related matches on the topic of your post:&lt;BR /&gt;
&lt;BR /&gt;
assigning sas date variables intnx site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Here's a few of several technical papers revealed with the Google search:&lt;BR /&gt;
&lt;BR /&gt;
Sample 24830: Self- adjusting Date Formats&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/24/830.html" target="_blank"&gt;http://support.sas.com/kb/24/830.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
A Beginners Guide to SAS  Date and Time Handling&lt;BR /&gt;
Wayne Finley, State of California HHSDC, Sacramento, CA&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi25/25/btu/25p058.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi25/25/btu/25p058.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 18 May 2009 21:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose-with-continues-dates/m-p/33578#M8126</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-05-18T21:14:49Z</dc:date>
    </item>
  </channel>
</rss>

