Date: Mon, 4 Nov 2002 15:02:46 -0500
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Subject: Re: Merge tip
There is no code shown, and no sample data, so it's kind of hard to
precisely identify the problem.
My impression is that there is no BY statement. That's because with a BY,
the processing logic is is compartmentalized for each BY group and it makes
little sense to characterize one dataset as being shorter overall.
So one possible solution is to replace the MERGE statement with two SET
data short; do a = 1,3,5; output; end; run;
data long; do b = 2,4,6,8; output; end; run;
merge short long;
set short; set long;
USE_MERGE will have four observations, but USE_2SETS will have only three.
On Mon, 4 Nov 2002 01:38:38 -0800, Pacal <pacal2012@HOTMAIL.COM> wrote:
>I would merge two data set but at the end of the shorter one
>I would the data step will stop. Any suggestion?
>I can do this merge with another data step before but I'd like
>to optimize this step.