02-27-2018 08:29 PM
You want a Match Merge.
The different methods of combining data sets are outlined here:
And each section will have an example with data and code.
02-27-2018 10:51 PM - edited 02-27-2018 10:53 PM
02-28-2018 01:33 PM
Here is the solution I used in the answers to the even numbered problems (available to teachers or self-learners who make a request to SAS).
input manuf : $10. Markup;
proc sort data=learn.bicycles out=bicycles;
merge bicycles markup;
NewTotal = TotalSales*Markup;
format NewTotal dollar10.;
title "Listing of MARKUP_PRICES";
proc print data=markup_prices noobs;
By the way, I have just finished the second edition of the Learning SAS by Example book and the technical edits are due today. I hope you will take a look at it. All of the programs are up to date with the changes in SAS since the first edition was written. The chapter on SAS Graph was replaced with one on PROC SGPLOT and a new chapter covering regular expressions was added.