Usage Note 22174: PROC COMPARE output truncates character variables at 20 characters
If you are comparing character variables that are longer than 20 characters, the printed output from PROC COMPARE shows only the first 20 characters in the Value Comparison Report and only the first 12 characters if the TRANSPOSE option is specified.
The limits mentioned above apply only to the printed output generated by PROC COMPARE. To see the entire value, you will have to create an output data set from PROC COMPARE using the following options:
- The OUT= option, to specify the name of the output data set.
- The OUTNOEQUAL option, to suppress writing observations where all variables match.
- The OUTBASE and OUTCOMP options, to include the observations from the BASE= and COMPARE=
data sets.
- The NOPRINT option, to suppress the default printed report(s).
Here is an example that illustrates the differences.
data one;
string='abc def ghi jkl mno qrs tuv wxyz';
run;
data two;
string='abc def ghi jkl mno qrs tuv zzzz';
run;
title "Default table output";
proc compare base=one compare=two outbase outcomp outdif outnoequal out=diffs;
run;
proc print data=diffs;
Title 'Output data set';
run;
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
If you are comparing character variables that are longer than 20 characters, the printed output from PROC COMPARE shows only the first 20 characters in the Value Comparison Report and only the first 12 characters if the TRANSPOSE option is specified.
Type: | Usage Note |
Priority: | low |
Topic: | SAS Reference ==> Procedures ==> COMPARE
|
Date Modified: | 2021-11-12 12:39:25 |
Date Created: | 2002-12-16 10:56:36 |