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 (October 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 11 Oct 2010 10:56:59 -0700
Reply-To:     Zhaoyan Diao <jacksas001@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Zhaoyan Diao <jacksas001@GMAIL.COM>
Subject:      Re: match file
In-Reply-To:  <342610.77301.qm@web37506.mail.mud.yahoo.com>
Content-Type: text/plain; charset="ISO-8859-1"

Hi Rob

Is this what you want to get? Please check variables' name in table a and switch ID and SIRE.

data a; input ID $ SIRE $ DAM $ TYPE; cards; PC9036 7002 1 1 PC0088 969381 1 1 PC1093 969381 1 1 PC2103 969381 1 1 PC9029 58511 2 1 ; run; data b; input id $; cards; 58511 969381 988688 998628 ; run; proc sql; create table c as select a.ID, DAM, SIRE, TYPE from a, b where a.SIRE=b.id; quit; proc print; run;

Good Luck Jack

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of oslo Sent: Monday, October 11, 2010 10:29 AM To: SAS-L@LISTSERV.UGA.EDU Subject: match file

Dear SAS-L Users;

I have tried to mach data from to different data set but failed some reason. I would be greatly appreciated if any help will be. Regards,

Rob

My data files are look like as follow dataa;inputID $ SIRE $ DAM $ TYPE;cards PC9036 7002 1 1 PC0088 969381 1 1 PC1093 969381 1 1 PC2103 969381 1 1 PC9029 58511 2 1;datab;inputid $;cards 58511 969381 988688 998628 AND MY SAS CODES ARE

procsql; selecta, DAM, SIRE, TYPE froma, bwhereone.id=two.id;procprint;run;;


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