Previous Page | Next Page

The PRINT Procedure

ID Statement


Identifies observations by using the formatted values of the variables that you list instead of by using observation numbers.
Featured in:

Controlling the Layout of a Report with Many Variables

Creating a Customized Layout with BY Groups and ID Variables


ID variable(s) </ STYLE <(location(s))> =<style-element-name><[style-attribute-specification(s)]>>;


Required Arguments

variable(s)

specifies one or more variables to print instead of the observation number at the beginning of each row of the report.

Restriction: If the ID variables occupy so much space that no room remains on the line for at least one other variable, PROC PRINT writes a warning to the SAS log and does not treat all ID variables as ID variables.
Interaction: If a variable in the ID statement also appears in the VAR statement, the output contains two columns for that variable.

Options

STYLE <(location(s))>=<style-element-name><[style-attribute-specification(s)]>

specifies the style element to use for ID columns created with the ID statement. For information about the arguments of this option and how it is used, see STYLE in the PROC PRINT statement.

Tip: To specify different style elements for different ID columns, use a separate ID statement for each variable and add a different STYLE option to each ID statement.

Using the BY Statement with an ID Statement

PROC PRINT uses a special layout if all BY variables appear in the same order at the beginning of the ID statement. (See Creating a Customized Layout with BY Groups and ID Variables.)

Previous Page | Next Page | Top of Page