|
Hi,
I am very confused now!
I originally had the following code:
data BOTHAB (keep=idseq add_f city_f state_f zip5 zip4_f);
set updte;
by idseq;
if last.idseq then output bothAB;
run;
data ONLYA (keep=idseq add_f city_f state_f zip5 zip4_f);
set onlymast;
by idseq;
if last.idseq then output onlyA;
run;
------------------------------------
I thought that I can combine the two into one like this:
data ONLYA (keep=idseq add_f city_f state_f zip5 zip4_f)
BOTHAB (keep=idseq add_f city_f state_f zip5 zip4_f);
set onlymast;
by idseq;
if last.idseq then output onlyA;
set updte;
by idseq;
if last.idseq then output bothAB;
run;
----------------------------------------------------------------
When I checked the log file, it says:
NOTE: There were 131946 observations read from the data set WORK.ONLYMAST.
NOTE: There were 131947 observations read from the data set WORK.UPDTE.
----------------------------------------------------------------
However, there should be 1254959 observations from the dataset WORK.UPDTE
Can you compare the two codes and tell me what is wrong in the second code??
Thanks,
Duckhye
|