Putting It All Together
Rather than drill another sashelp.class example through your brain, let’s try something a little more fun: sashelp.cars. The sashelp.cars data set has lots of information about specific makes and models of cars, including engine and drivetrain details, mileage, body type, wheelbase, price, etc. Let’s modify this data set to shop for a new car. We’ll start with looking for only non-convertible sports cars. Here is the data that we are starting with.
DATA cars; SET sashelp.cars(WHERE = (type = ‘Sports’ AND ^(model LIKE ‘%convert%’))); run; PROC TEMPLATE; DEFINE TABLE mytable;> END; RUN; %render(mytable, cars(OBS = 8));
This is the output from the code above.
The COLUMN statement is used to reduce the number of columns down ...