Site LogoIntroduction to SAS: Proc Print

Download the SAS Tutorial in a single PDF file from the SAS Tutorial page. The online tutorial will be eliminated in August 2017.

Contents Index

Proc print lists the values of the variables in a SAS data set in the output window. Proc contents displays only the names and types of variables in a data set.

The most basic form is

proc print data=first;

In this form, a complete listing of the values of all variables in the data set first will be printed in the output window. The data= statement is required. A more complete example is

proc print 
var x y;
by x;

The label option uses variable labels as column headings rather than variable names (the default).

The noobs option omits the OBS column of output.

The heading=vertical option prints the column headings vertically. This is useful when the names are long but the values of the variable are short.

The var option specifies the variables to be listed and the order in which they will appear.

The optional by statement produces output grouped by values of the by variable(s).

For further information see online help under SAS SYSTEM--REPORT WRITING--PRINT or the SAS Procedures Guide.

© Copyright 2016 Jerry Alan Veeh. All rights reserved.