Date: Thu, 3 Jan 2002 16:36:10 -0700
Reply-To: Kenneth Moody <KennethMoody@FIRSTHEALTH.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Kenneth Moody <KennethMoody@FIRSTHEALTH.COM>
Subject: Re: Implicit merge on PROC
Content-Type: text/plain; charset=us-ascii
You can get the effect by using a data step view. For example,
DATA virtual / view=virtual;
merge set1 set2; by id;
run;
proc print data=virtual;
run;
The view is not executed until it is referenced in the proc print step,
and it is not
necessary to physically create the merged dataset.
Ken Moody
First Health, Metrics Department
Voice: 916-374-3924
EMail: KennethMoody@firsthealth.com
>>> "Kemp, Michael" <Michael.Kemp@GS.COM> 01/03/02 03:23PM >>>
Is it possible to merge two (or more datasets) using a PROC statement?
For example,
If you want to do a proc print on two separate datasets, must you
always run
a data step prior to the PROC that merges the data, and then run the
PROC
against the resultant dataset? Or, is there a way to do something with
the
effect of:
PROC PRINT DATA=SET1 MERGE SET2 BY ID;
RUN;
If this were possible, it would seem to me to be much more efficient.
Thanking you in advance.
Mike Kemp