Previous Page | Next Page

The COMPARE Procedure

Syntax: COMPARE Procedure


Restriction: You must use the VAR statement when you use the WITH statement.
Tip: Supports the Output Delivery System. See Output Delivery System: Basic Concepts in SAS Output Delivery System: User's Guide for details.
Tip: You can use the LABEL, ATTRIB, FORMAT, and WHERE statements. See Statements with the Same Function in Multiple Procedures for details. You can also use any global statements. See Global Statements for a list.
Table of Contents: The COMPARE Procedure

PROC COMPARE <option(s)>;
BY <DESCENDING> variable-1
<...<DESCENDING> variable-n>
<NOTSORTED>;
ID <DESCENDING> variable-1
<...<DESCENDING> variable-n>
<NOTSORTED>;
VAR variable(s);
WITH variable(s);

Task Statement
Compare the contents of SAS data sets, or compare two variables PROC COMPARE
Produce a separate comparison for each BY group BY
Identify variables to use to match observations ID
Restrict the comparison to values of specific variables VAR
Compare variables of different names WITH and VAR
Compare two variables in the same data set WITH and VAR

Previous Page | Next Page | Top of Page