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 1999, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 27 Jan 1999 16:55:18 -0800
Reply-To:   Tom Metzler <metzler@ITSA.UCSF.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Tom Metzler <metzler@ITSA.UCSF.EDU>
Subject:   Merging datasets with missing values
Content-Type:   multipart/mixed;

I want to do a match-merge of two SAS datasets that have identical variable names. The problem is that a given observation may have a missing value for a variable in one set, and a non-missing value in the other set. I want to include the non-missing value in the output set, no matter which input file it comes from. (If both sets contain non-missing values, they will be identical, so it doesn't matter which set they are taken from). Is there a straightforward way of doing this? The following illustrates what I'm trying to do:

dataset1: id var1 var2 var3 1 1 . 3 2 4 5 . 3 7 8 9

dataset2: id var1 var2 var3 1 1 2 . 3 7 . 9 4 . 11 12

merged dataset: id var1 var2 var3 1 1 2 3 2 4 5 . 3 7 8 9 4 . 11 12

----------------------------- Tom Metzler PTSD Research Program (116P) San Francisco VA Medical Center 4150 Clement St. San Francisco, CA 94121 (415) 221-4810 x3082


winmail.dat [application/ms-tnef]


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