Help using Base SAS procedures

Proc Compare Report

Reply
N/A
Posts: 0

Proc Compare Report

Hello Everyone,

I am trying to create a pdf report based on the comparison result of same dataset created at different dates. Likewise, I would like to add the comparison result for 10 or more datasets in the same report. Kind of one after the other datasets. I tried this using SAS Macro but it overrides the previous result for every dataset(macro value entered) and only the last dataset result is displayed. How can this be achieved? Any suggestions or idea would be appreciated.

Thanks,
SASque
Super Contributor
Super Contributor
Posts: 3,174

Re: Proc Compare Report

Posted in reply to deleted_user
Share what code you attempted to use with a macro - possilby you need to move some portion of your SAS program (ODS stmt) to be outside your macro so that it is opened once. What type of report (HTML, RTF, PDF?) And suggest you share what SAS version you are running, as well.

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: Proc Compare Report

It is in PDF format. SAS 9.1.3.
Here is the code:

%macro strtbl(tbl=);
ods listing close;
ods pdf style=printer FILE="c:\strreport.pdf";
proc compare base=refdata.&tbl compare=trdata.&tbl novalues;
run;
proc contents data=trdata.&tbl nods order=varnum;
title;
run;
ods pdf close;
ods listing;

%mend strtbl;

%strtbl(tbl=AE);
%strtbl(tbl=BHEPL);
%strtbl(tbl=CMEDS);
%strtbl(tbl=DEMO);.......and so on...
N/A
Posts: 0

Re: Proc Compare Report

You are right....somehow I didn't look at the options...it works....Thanks for you help.

One more question: Is it possible to create a coverpage for this report just with a "logo", tile of the report and project #. only and this shld be displayed only on the first page. How can it be done?
Super Contributor
Super Contributor
Posts: 3,174

Re: Proc Compare Report

Posted in reply to deleted_user
Yes, it's possible. Look at ODS LAYOUT - with some enhancements available in SAS 9.2. You will find prior posts in the forum archives, as well as at the SAS support site.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic/post:

ods pdf cover page site:sas.com
N/A
Posts: 0

Re: Proc Compare Report

One more question related to Proc Compare report. Is it possible to suppress variables summary and observations summary and display only Dataset Summary?? If so, how???

Also how can I display an image or a picture right at the center of the first page of the report not on any other page??
Any help or thought would be appreciated.

Thanks,
Super Contributor
Super Contributor
Posts: 3,174

Re: Proc Compare Report

Posted in reply to deleted_user
Suggest you review the PROC COMPARE documentation for report generation options. Consider using ODS with TEXT= keyword for generating your image.

Scott Barry
SBBWorks, Inc.

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a000146741.htm
Ask a Question
Discussion stats
  • 6 replies
  • 178 views
  • 0 likes
  • 2 in conversation