PRINT Procedure

Tips: Supports the Output Delivery System. For details, see Output Delivery System: Basic Concepts in SAS Output Delivery System: User's Guide.

You can use the ATTRIB, FORMAT, LABEL, and WHERE statements. See SAS Statements: Reference For more information, see Statements with the Same Function in Multiple Procedures. You can also use any global statement. For a list, see Global Statements in SAS Statements: Reference.

Syntax

PROC PRINT <option(s)>;
BY <DESCENDING> variable-1 <…<DESCENDING> variable-n> <NOTSORTED>;
PAGEBY BY-variable;
SUMBY BY-variable;
ID variable(s) <option>;
SUM variable(s) <option>;
VAR variable(s) <option>;

Table of Procedure Tasks

Statement Task Example
PROC PRINT Statement Print observations in a data set Ex. 1, Ex. 2, Ex. 3, Ex. 5
BY Statement Produce a separate section of the report for each BY group Ex. 3, Ex. 4, Ex. 5, Ex. 6, Ex. 8
ID Statement Identify observations by the formatted values of the variables that you list instead of by observation numbers Ex. 7
PAGEBY Statement Control page ejects that occur before a page is full Ex. 3
SUMBY Statement Limit the number of sums that appear in the report Ex. 4, Ex. 5, Ex. 6, Ex. 8
SUM Statement Total values of numeric variables Ex. 6
VAR Statement Select variables that appear in the report and determine their order Ex. 1, Ex. 2, Ex. 8