Selecting Variables
The PROC PRINT Step
By
default, a PROC PRINT step lists all the variables in a data set.
You can select variables and control the order in which they appear
by using a VAR statement in your PROC PRINT step.
Syntax, VAR statement:
VAR variable(s);
|
For example, the following VAR statement specifies that
only the variables Age, Height, Weight, and Fee be printed, in that
order:
proc print data=clinic.admit;
var age height weight fee;
run;
The procedure output
from the PROC PRINT step with the VAR statement lists only the values
for those variables.
Figure 5.2 PRINT Procedure Output
In addition to selecting variables, you can suppress observation ...
Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.