LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 6 Apr 2004 18:54:35 -0500
Reply-To:   Duck-Hye Yang <dyang@CHAPINHALL.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Duck-Hye Yang <dyang@CHAPINHALL.ORG>
Subject:   What's wrong in this code---I think it is weird!
Comments:   To: SAS-L@LISTSERV.VT.EDU
Content-Type:   text/plain; charset=US-ASCII

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


Back to: Top of message | Previous page | Main SAS-L page