BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Kastchei
Pyrite | Level 9

Hello,

 

I am creating a PDF out of proc compare.  The output has an extreme amount of whitespace, such that a completely clean compare takes up an entire page.  This doesn't happen in the HTML output or listing output.  It almost looks as if the entire thing has been double-spaced.  Any ideas how to get rid of this?  Screenshots are attached.

 

Warm regards,

Michael

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ
Hi:
In my memory of some SAS output, PROC COMPARE doesn't work the way other ODS output works. The entire report from PROC COMPARE is put inside a "box" or container and then all the output is written out as it would have been written out in the "old days" before ODS -- as thought it were going to the old OUTPUT Window.

I do not believe there's a way to change the output from PROC COMPARE.

In the old days, I used to write PROC COMPARE to a .LST file or .TXT file using PROC PRINTTO and then open the .LST file with Word and "pretty it up". The type of output that is created is called "Batch output" from PROC COMPARE.

This document https://support.sas.com/rnd/base/ods/templateFAQ/ODS91.pdf has PROC TEMPLATE code for changing the font from SAS Monospace to a different font, but does not address the spacing issue or whitespace issue. You might want to check with Tech Support about whether there's a way to influence the spacing (but my guess is that there's not).

Cynthia

View solution in original post

3 REPLIES 3
Reeza
Super User

Show some code please that generates that output.

 


@Kastchei wrote:

Hello,

 

I am creating a PDF out of proc compare.  The output has an extreme amount of whitespace, such that a completely clean compare takes up an entire page.  This doesn't happen in the HTML output or listing output.  It almost looks as if the entire thing has been double-spaced.  Any ideas how to get rid of this?  Screenshots are attached.

 

Warm regards,

Michael


 

Reeza
Super User

Change your style to journal or minimal and set startpage to never. 

 

data cars;
set sashelp.cars;
call streaminit(25);
if age in (13, 14) then call missing(weight);
if age in (10, 12) then height = height + rand('normal', 5);
run;


ods pdf file='C:\_localdata\demo.pdf' style=minimal startpage=never;
proc compare data=cars compare=sashelp.cars;
run;
ods pdf close;

@Reeza wrote:

Show some code please that generates that output.

 


@Kastchei wrote:

Hello,

 

I am creating a PDF out of proc compare.  The output has an extreme amount of whitespace, such that a completely clean compare takes up an entire page.  This doesn't happen in the HTML output or listing output.  It almost looks as if the entire thing has been double-spaced.  Any ideas how to get rid of this?  Screenshots are attached.

 

Warm regards,

Michael


 


 

Cynthia_sas
SAS Super FREQ
Hi:
In my memory of some SAS output, PROC COMPARE doesn't work the way other ODS output works. The entire report from PROC COMPARE is put inside a "box" or container and then all the output is written out as it would have been written out in the "old days" before ODS -- as thought it were going to the old OUTPUT Window.

I do not believe there's a way to change the output from PROC COMPARE.

In the old days, I used to write PROC COMPARE to a .LST file or .TXT file using PROC PRINTTO and then open the .LST file with Word and "pretty it up". The type of output that is created is called "Batch output" from PROC COMPARE.

This document https://support.sas.com/rnd/base/ods/templateFAQ/ODS91.pdf has PROC TEMPLATE code for changing the font from SAS Monospace to a different font, but does not address the spacing issue or whitespace issue. You might want to check with Tech Support about whether there's a way to influence the spacing (but my guess is that there's not).

Cynthia

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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