<?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: Reshaping a large data set from long to wide in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/231462#M54577</link>
    <description>thanks, this worked too! I ended up using the Macro in the end but just checked it against your code which was great. Thanks!</description>
    <pubDate>Fri, 23 Oct 2015 21:54:00 GMT</pubDate>
    <dc:creator>mcdj</dc:creator>
    <dc:date>2015-10-23T21:54:00Z</dc:date>
    <item>
      <title>Reshaping a large data set from long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230642#M54507</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to reshape my large datset with lots of missing data and variable names that are mixed character and numeric (none of that I want to drop). I have read about both the PROC TRANSPOSE&amp;nbsp;and the ARRAY&amp;nbsp;options to reshape from long to wide and both seem to&amp;nbsp;include the need to write out all of the names of my hundreds of variables. I will need to reshape the data by two different variables ID and Sex in order to make the VISITDATE variable that is currently long, wide. The issue is that many of the&amp;nbsp;VISITDATEs are a different date over a 10 year period in the format DDmonthYY (12march04). &amp;nbsp;Because of this I am thinking I can somehow reshape and make new vars VISITDATE1-VISITDATE20 (the max in the dataset) but having a hard time wrapping my head around the actual array coding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can some brilliant programmer in dates and arrays help out?&lt;/P&gt;&lt;P&gt;Thank you so much in advance,&lt;/P&gt;&lt;P&gt;Megan&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 20:05:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230642#M54507</guid>
      <dc:creator>mcdj</dc:creator>
      <dc:date>2015-10-19T20:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping a large data set from long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230651#M54508</link>
      <description>&lt;P&gt;One: some example data and what the final output should be is helpful.&lt;/P&gt;
&lt;P&gt;Two: What will you do next with the data? If you don't want to write variable names when creating them the issue will magnify when trying to manipulate them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this is a report then proc tabulate and proc report both will generate a column for each level of a variable defined to create groups (report) or class (tabulate).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the variables are named "nicely" then variable lists do help. If you have a bunch of variables of the same typle that all start with DATE, then DATE: &amp;lt;= note the colon, will allow you to assign them all to an array easily, or if they have sequential names such as Var1 to Var23 then a range list like Var1 - Var23 does similar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A little concerned about ID and SEX involved with setting a Date variable though.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 22:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230651#M54508</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-10-19T22:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping a large data set from long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230675#M54510</link>
      <description>&lt;P&gt;Please provide some sample data "want" and explain us what you need and why.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's most of the time much better to have data in a long instead of a wide structure&amp;nbsp;so I would like to understand why you want it the other way round.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 07:39:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230675#M54510</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-10-20T07:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping a large data set from long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230776#M54516</link>
      <description>&lt;P&gt;HI there, thanks for replying. To answer your Qs:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Please note that the HTID is the SAME for 2 people (based on a couples study) so I am trying to make individual IDs and you have to do this by sorting by htid and sex. Also note there are multiple observtaion (rows) for each member of the couple (HTID) at different times. Also the variables are unfortuantely not named in a way where I can use an array var1-var25 so will likely need to rename them temporarily to get the data in shape.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example data have:&lt;/P&gt;&lt;P&gt;HTID SEX AGE VISITDATE &amp;nbsp; &amp;nbsp; &amp;nbsp; var4 &amp;nbsp; var5 &amp;nbsp; &amp;nbsp;var6....var200&lt;/P&gt;&lt;P&gt;5014 M &amp;nbsp; &amp;nbsp; 35 &amp;nbsp; &amp;nbsp; &amp;nbsp;10march2002&lt;/P&gt;&lt;P&gt;5014 M &amp;nbsp; &amp;nbsp; 35 &amp;nbsp; &amp;nbsp; &amp;nbsp; 02june2002&lt;/P&gt;&lt;P&gt;5014 M &amp;nbsp; &amp;nbsp; 35 &amp;nbsp; &amp;nbsp; &amp;nbsp; 18sept2002&lt;/P&gt;&lt;P&gt;5014 M &amp;nbsp; &amp;nbsp; 35 &amp;nbsp; &amp;nbsp; &amp;nbsp; 02jan2003&lt;/P&gt;&lt;P&gt;5014 F &amp;nbsp; &amp;nbsp; 30 &amp;nbsp; &amp;nbsp; &amp;nbsp; 10march2002&lt;/P&gt;&lt;P&gt;5014 F &amp;nbsp; &amp;nbsp; 30 &amp;nbsp; &amp;nbsp; &amp;nbsp; 26june2002&lt;/P&gt;&lt;P&gt;5023 M &amp;nbsp; &amp;nbsp;28 &amp;nbsp; &amp;nbsp; &amp;nbsp; 20june2003&lt;/P&gt;&lt;P&gt;5023 M &amp;nbsp; &amp;nbsp;28 &amp;nbsp; &amp;nbsp; &amp;nbsp; 21sept2003&lt;/P&gt;&lt;P&gt;5023 M &amp;nbsp; &amp;nbsp;28 &amp;nbsp; &amp;nbsp; &amp;nbsp; 5jan2004&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example data want:&amp;nbsp;each individual with their own row with each visitdate as an unique event&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID &amp;nbsp;HTID &amp;nbsp;SEX AGE &amp;nbsp;VISITDATE1 &amp;nbsp; &amp;nbsp;VISITDATE2 &amp;nbsp; &amp;nbsp;VISITDATE3.....&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; 5014 &amp;nbsp;M &amp;nbsp; &amp;nbsp; 35 &amp;nbsp; &amp;nbsp; &amp;nbsp;10march2002 &amp;nbsp;02june2002 &amp;nbsp; &amp;nbsp;&amp;nbsp;18sept2002&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; 5014 &amp;nbsp;F &amp;nbsp; &amp;nbsp; &amp;nbsp;30 &amp;nbsp; &amp;nbsp; &amp;nbsp;10march2002 &amp;nbsp;&amp;nbsp;26june2002&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) I am happy to write variable names if that is the only way, I just wasn't sure. I thought maybe it would be easier to rename them to some convention like var1-var200 in order to&amp;nbsp;get the data in shape first with arrays, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eventually, after descriptive stats, etc. I will be be perfoming some multivariate logistic regressions and build marginal structural models etc.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 15:42:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230776#M54516</guid>
      <dc:creator>mcdj</dc:creator>
      <dc:date>2015-10-20T15:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping a large data set from long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230777#M54517</link>
      <description>&lt;P&gt;Hi Patrick,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please note that the HTID is the SAME for 2 people (based on a couples study) so I am trying to make individual IDs and you have to do this by sorting by htid and sex. Also note there are multiple observtaion (rows) for each member of the couple (HTID) at different times. Also the variables are unfortuantely not named in a way where I can use an array var1-var25 so will likely need to rename them temporarily to get the data in shape.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example data have:&lt;/P&gt;&lt;P&gt;HTID SEX AGE VISITDATE &amp;nbsp; &amp;nbsp; &amp;nbsp; var4 &amp;nbsp; var5 &amp;nbsp; &amp;nbsp;var6....var200&lt;/P&gt;&lt;P&gt;5014 M &amp;nbsp; &amp;nbsp; 35 &amp;nbsp; &amp;nbsp; &amp;nbsp;10march2002&lt;/P&gt;&lt;P&gt;5014 M &amp;nbsp; &amp;nbsp; 35 &amp;nbsp; &amp;nbsp; &amp;nbsp; 02june2002&lt;/P&gt;&lt;P&gt;5014 M &amp;nbsp; &amp;nbsp; 35 &amp;nbsp; &amp;nbsp; &amp;nbsp; 18sept2002&lt;/P&gt;&lt;P&gt;5014 M &amp;nbsp; &amp;nbsp; 35 &amp;nbsp; &amp;nbsp; &amp;nbsp; 02jan2003&lt;/P&gt;&lt;P&gt;5014 F &amp;nbsp; &amp;nbsp; 30 &amp;nbsp; &amp;nbsp; &amp;nbsp; 10march2002&lt;/P&gt;&lt;P&gt;5014 F &amp;nbsp; &amp;nbsp; 30 &amp;nbsp; &amp;nbsp; &amp;nbsp; 26june2002&lt;/P&gt;&lt;P&gt;5023 M &amp;nbsp; &amp;nbsp;28 &amp;nbsp; &amp;nbsp; &amp;nbsp; 20june2003&lt;/P&gt;&lt;P&gt;5023 M &amp;nbsp; &amp;nbsp;28 &amp;nbsp; &amp;nbsp; &amp;nbsp; 21sept2003&lt;/P&gt;&lt;P&gt;5023 M &amp;nbsp; &amp;nbsp;28 &amp;nbsp; &amp;nbsp; &amp;nbsp; 5jan2004&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example data want:&amp;nbsp;each individual with their own row with each visitdate as an unique event&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID &amp;nbsp;HTID &amp;nbsp;SEX AGE &amp;nbsp;VISITDATE1 &amp;nbsp; &amp;nbsp;VISITDATE2 &amp;nbsp; &amp;nbsp;VISITDATE3.....&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; 5014 &amp;nbsp;M &amp;nbsp; &amp;nbsp; 35 &amp;nbsp; &amp;nbsp; &amp;nbsp;10march2002 &amp;nbsp;02june2002 &amp;nbsp; &amp;nbsp;&amp;nbsp;18sept2002&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; 5014 &amp;nbsp;F &amp;nbsp; &amp;nbsp; &amp;nbsp;30 &amp;nbsp; &amp;nbsp; &amp;nbsp;10march2002 &amp;nbsp;&amp;nbsp;26june2002&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eventually, after descriptive stats, etc. I will be be perfoming some multivariate logistic regressions and build marginal structural models etc.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 15:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230777#M54517</guid>
      <dc:creator>mcdj</dc:creator>
      <dc:date>2015-10-20T15:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping a large data set from long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230786#M54520</link>
      <description>&lt;P&gt;You can use two variables to uniquely define your individuals. &amp;nbsp;PROC MEANS; BY HTID SEX; &amp;nbsp;for example.&lt;/P&gt;
&lt;P&gt;Or you can make a new unique id variable if you want.&lt;/P&gt;
&lt;P&gt;data want ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; by htid sex;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; uid + first.sex ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 16:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230786#M54520</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-10-20T16:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping a large data set from long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230817#M54527</link>
      <description>&lt;P&gt;Thank you. So that will just give me a unique ID. But what about then reshaping VISIDATE? Especially since I want to&lt;SPAN&gt;&amp;nbsp;transpose multiple variables (var4_visit1, var4_visit2, etc. ) by visitdate? Any idea if that is possible? THanks again.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 20:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230817#M54527</guid>
      <dc:creator>mcdj</dc:creator>
      <dc:date>2015-10-20T20:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping a large data set from long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230820#M54529</link>
      <description>&lt;P&gt;I wouldn't want to try to transpose more than 2 variables especially in a large dataset. Since you mentioned that you have missing data and mixed formated data, you might end up with a lot of problems if you try to reshape multiple variables.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 20:09:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230820#M54529</guid>
      <dc:creator>slangan</dc:creator>
      <dc:date>2015-10-20T20:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping a large data set from long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230910#M54538</link>
      <description>&lt;P&gt;There is a macro that transposes several variables at once. I've never used it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;%MultiTranspose&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.medicine.mcgill.ca/epidemiology/joseph/pbelisle/multitranspose.html" target="_blank"&gt;http://www.medicine.mcgill.ca/epidemiology/joseph/pbelisle/multitranspose.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 12:41:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/230910#M54538</guid>
      <dc:creator>slangan</dc:creator>
      <dc:date>2015-10-21T12:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping a large data set from long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/231191#M54562</link>
      <description>&lt;P&gt;Hi, using the data youi posted ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;data x;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;input htid sex :$1. age visitdate :anydtdte.;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;5014 M 35 10MARCH2002&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;5014 M 35&amp;nbsp; 02JUNE2002&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;5014 M 35&amp;nbsp; 18SEPT2002&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;5014 M 35&amp;nbsp; 02JAN2003&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;5014 F 30&amp;nbsp; 10MARCH2002&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;5014 F 30&amp;nbsp; 26JUNE2002&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;5023 M 28&amp;nbsp; 20JUNE2003&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;5023 M 28&amp;nbsp; 21SEPT2003&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;5023 M 28&amp;nbsp; 5JAN2004&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;proc sql noprint;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;select max(obs) into :nobs from (select count(*) as obs from x group by htid, sex, age);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;proc summary nway data=x missing; &lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;class htid sex age;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;output out=x_wide(drop=_type_ _freq_) idgroup(out[&amp;amp;nobs] (visitdate)=);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;format v: date9.;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data set X_WIDE ...&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visitdate_&amp;nbsp;&amp;nbsp;&amp;nbsp; visitdate_&amp;nbsp;&amp;nbsp;&amp;nbsp; visitdate_&amp;nbsp;&amp;nbsp;&amp;nbsp; visitdate_&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Obs&amp;nbsp;&amp;nbsp;&amp;nbsp; htid&amp;nbsp;&amp;nbsp;&amp;nbsp; sex&amp;nbsp;&amp;nbsp;&amp;nbsp; age&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp; 10MAR2002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 26JUN2002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 35&amp;nbsp;&amp;nbsp;&amp;nbsp; 10MAR2002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02JUN2002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18SEP2002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02JAN2003&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5023&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28&amp;nbsp;&amp;nbsp;&amp;nbsp; 20JUN2003&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21SEP2003&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05JAN2004&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Take a look at ...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Transposing Data Using PROC SUMMARY'S IDGROUP Option&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings10/102-2010.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings10/102-2010.pdf&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 15:21:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/231191#M54562</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2015-10-22T15:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping a large data set from long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/231462#M54577</link>
      <description>thanks, this worked too! I ended up using the Macro in the end but just checked it against your code which was great. Thanks!</description>
      <pubDate>Fri, 23 Oct 2015 21:54:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reshaping-a-large-data-set-from-long-to-wide/m-p/231462#M54577</guid>
      <dc:creator>mcdj</dc:creator>
      <dc:date>2015-10-23T21:54:00Z</dc:date>
    </item>
  </channel>
</rss>

