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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 786 views
  • 0 likes
  • 3 in conversation