PRINT Procedure

ID Statement

Identifies observations by using the formatted values of the variables that you list instead of by using observation numbers.
Controlling the Layout of a Report with Many VariablesCreating a Customized Layout with BY Groups and ID Variables

Syntax

Required Argument

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.

Optional Argument

STYLE <(location(s))>=<style-element-name> <[style-attribute-specification(s)]>
specifies the style element to use for ID columns created with the ID 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.
See:For information about the arguments of this option and how it is used, see the STYLE= option in the PROC PRINT statement.

Details

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.)