29.12.2013 Views

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The COMPARE Procedure 4 Program 255<br />

Examples: COMPARE Procedure<br />

Example 1: Producing a Complete Report of the Differences<br />

Procedure features:<br />

PROC COMPARE statement options<br />

BASE=<br />

PRINTALL<br />

COMPARE=<br />

Data sets:<br />

PROCLIB.ONE, PROCLIB.TWO on page 224<br />

This example shows the most complete report that PROC COMPARE produces as<br />

procedure output.<br />

Program<br />

Declare the PROCLIB <strong>SAS</strong> data library.<br />

libname proclib ’<strong>SAS</strong>-data-library’;<br />

Set the <strong>SAS</strong> system options. The NODATE option suppresses the display of the date and time<br />

in the output. PAGENO= specifies the starting page number. LINESIZE= specifies the output<br />

line length, and PAGESIZE= specifies the number of lines on an output page.<br />

options nodate pageno=1 linesize=80 pagesize=40;<br />

Create a complete report of the differences between two data sets. BASE= and<br />

COMPARE= specify the data sets to compare. PRINTALL prints a full report of the differences.<br />

proc compare base=proclib.one compare=proclib.two printall;<br />

title ’Comparing Two Data Sets: Full Report’;<br />

run;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!