Date: Tue, 16 Nov 1999 12:43:57 +0800
Reply-To: Wen-Feng Hsiao <d8442803@STUDENT.NSYSU.EDU.TW>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Wen-Feng Hsiao <d8442803@STUDENT.NSYSU.EDU.TW>
Subject: Re: comparing two datasets which are from different files.
It works, thanks a lot!
Pardon me that I have a further question. I have two files which store
the responses of subjects from two different classes separately. (Because
I want to test whether these two groups are different, I store them in
two files.) If I want to aggregate them (for example, I believe they are
not significantly different), how can I do that in the SAS program. Maybe
the easiest way is using Excel to join these two files into a new one,
but I believe SAS has its own solution. Thanks for your patience.
The following code doesn't seem to work...
input v1 v2;
input v1 v2;
merge set1 set2;
In article <382EF65C.F6714E79@duke.edu>, firstname.lastname@example.org
> What you are doing in the first attempt is a one-to-one merge. You are
> assuming that the data in dataset1 and dataset2 are arranged so that row
> 1 matches up to row 1 in each data set, row 2 to row 2, etc. By using
> two infile and input statement pairs, you are creating just one SAS
> output dataset.
> PROC PRINT can only deal with one SAS dataset at a time, so you need to
> reduce your data to one dataset before printing. You can do that in
> your second example by adding the following code just before the RPOC
> DATA set;
> MERGE set1 set2;
> * and changing the PROC PRINT to: ;
> PROC PRINT DATA=set;
> More general comparisons of datasets can be obtained by using PROC