The master data set MDS have variables ID, X and several others. The update data set UDS have variables ID and X.
New values for X is given in UDS.
If there were only one observation for each ID, I could use the code:
UPDATE MDS UDS;
But how do I code if there are multiple observations for each ID in the master data set, and I want all observations for an ID(identity) updated according to the update data set?
Message was edited by: ErnestoC
Performed a search of the SAS support websitte http://support.sas.com/ with the two SAS-hosted documentation references for your consideration. The site has a wealth of supplemental technical reference documents as well.
Share your SAS code with the SAS log - post a reply pasting the information. Also, you will want to include PUTLOG _ALL_; messages (dump all variables to SAS log). Of course this information may help with your own problem debugging before sending to the forum. SAS version (and service pack), operating platform are also useful. Of course, after exhausting all available debugging options, you may want to contact SAS support with your particulars, opening a SAS track on the website.
Glad to see you were successful - for optimization, you may be able to reduce your code to a single DATA step, doing the RENAME= and DROP= on the SET statement (data set options in parentheses), and along with using the IN= on the SET for each contributing SAS file with your MERGE.