BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Is there a way we can persuade the normal output from proc compare to be nicely formatted. I don't mean taking output datasets and laying out their printing, but just from the native running of proc compare.
The procedure produces tables of comparison that look like candidates for the ODS approach.

PeterC
3 REPLIES 3
JuanVte
Calcite | Level 5
Hi PeterC,

I don't know any way to do that but it is true that this procedure output is awful. I have thought several times about to create a macro in order to do this task with a nicer output but it is still in my to do list.

Now, I am quite busy but if you are interested in doing that maybe we could arrange something!

Or perhaps somebody in this forum has already done it? 😉

Best regards,
Juanvte.
deleted_user
Not applicable
Juanvte
thank you, but ...

SAS9.2 documentation indicates PROC COMPARE supports ODS. I wouldn't recommend investing your time (or mine) on building this solution with such a short pay-back period.

PeterC
Sheri
Calcite | Level 5
Thanks for the ODS tip. I got very readable output with the code below:

PROC COMPARE BASE=Testfil.CurrentSCIP COMPARE=Testfil.NewSCIP OUTNOEQUAL
OUT=COMP OUTSTATS=COMPSTAT
BRIEF MAXPRINT=1 NOVALUES OUTNOEQUAL;
VAR SCIP1_d SCIP1_n SCIP2_d SCIP2_n SCIP3_d SCIP3_n n;
BY Patient_ID;
run;

ODS RTF FILE='L:\CoreMeasures\SCIP\Compare.RTF';
PROC PRINT DATA=COMP;
RUN;
ODS RTF CLOSE;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 760 views
  • 0 likes
  • 3 in conversation