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 (January 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 23 Jan 2002 14:44:02 -0500
Reply-To:     Charles Patridge <Charles_S_Patridge@PRODIGY.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Charles Patridge <Charles_S_Patridge@PRODIGY.NET>
Subject:      Re: Take both sets of two data sets
Comments: To: needful@WEB.DE

Dear Joerg,

I think a MERGE does help you -

data set1; infile cards missover; input prodcode $ 5. @13 valdate yymmdd8.; cards; ABCDE 20020101 DEFGH 20020101 GFHGH 20020101 ;;;; run;

data set2; infile cards missover; input prodcode $ 5. @13 valdate yymmdd8.; cards; ABCDE 20020101 DEFGH 20020201 GFHGH 20020101 ;;;; run;

proc sort data=set1 out=set1 ; by prodcode valdate; run; proc sort data=set2 out=set2 ; by prodcode valdate; run;

data both; merge set1 set2; by prodcode valdate; format valdate yymmdd10.; put prodcode valdate; run;

ABCDE 2002-01-01 DEFGH 2002-01-01 DEFGH 2002-02-01 GFHGH 2002-01-01 NOTE: The data set WORK.BOTH has 4 observations and 2 variables.

I suggest you point your browser to http://www.sconsig.com/tip00235.htm which will lead you to a Technical Paper by SAS Institute on everything you wish to know about Merging but were afraid to ask.

HTH, Charles Patridge Email: Charles_S_Patridge@prodigy.net


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