Date: Sat, 1 May 2010 09:10:11 -0400
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: Stack SAS data sets horizontally
First, thank you for sharing that .. I wasn't aware of it.
Second, the fire hasn't burned out. Much of the discussion is occuring
offline and some birdies have joined in as well. There are many
dimensions involved in the discussion including, minimally, capabilities,
intentions, misconceptions, pricing policies, development and support.
The discussion may have to be moved to sascommunity.org, or a similar
forum, in order to ensure that everyone's points are documented and easily
readable. At the moment, while we're still trying to discover the full
range of issues, I'm already putting out feelers to determine SAS's
interest and level of committment to the issues and solution(s).
On Fri, 30 Apr 2010 23:49:15 -0400, Mark Miller <mdhmiller@GMAIL.COM>
>(At the risk of adding fuel to a fire which seems to have died out....)
>Not that it does anything that you couldn't do with your own code,
>this is one case where EG makes it really easy
> Open both files in a new project (I have several JUNK projects)
> Select one of the files
>-- Start Query Builder
>-- drag all variables from file#1 into the Select Data box
>-- Click Add Tables
>-- Add the 2nd file (verify that the default join is what you want)
>-- drag all variables from file#2 into the end of the Select Data box
> (all vars in table#2 will have '1' appended to name)
>-- Click run
>... Mark Miller
>On Fri, Apr 30, 2010 at 11:18 PM, Arthur Tabachneck
>> Or, if you need them in a file, you could use something like:
>> proc sql noprint;
>> select trim(left(name)) || '= B_' || trim(left(name))
>> into :rename separated by ' '
>> from DICTIONARY.COLUMNS
>> where libname = 'SASHELP' /*must be in CAPS */
>> and memname = 'CLASS'; /*must be in CAPS */
>> data want;
>> set sashelp.class;
>> set sashelp.class (rename=(&rename.));
>> On Fri, 30 Apr 2010 21:42:12 -0500, Data _null_; <iebupdte@GMAIL.COM>
>> >Try something like this. Perhaps you can adapt it.
>> >proc sql;
>> > select a.*,b.*
>> > from sashelp.class as a, sashelp.class as b
>> > where a.name eq b.name
>> > ;
>> > quit;
>> > run;
>> >On 4/30/10, Keith Wright <firstname.lastname@example.org> wrote:
>> >> Is there a way to stack SAS data sets horizontally.....
>> >> When I use the following code:
>> >> data new;
>> >> set data1;
>> >> set data2;
>> >> run;
>> >> The two data sets are stack on top of each other......in new....
>> >> Because I need to keep all of the variables in both datasets, the
>> does not work because the names are exactly the same.
>> >> I need this because I want to view the results of several runs side-
>> >> THANKS.
>> >> Keith D Wright
>> >> Georgia State Univ.
>> >> Graduate Research Assistant
>> >> 770-490-4106