BookmarkSubscribeRSS Feed
sanjay1
Obsidian | Level 7

Hi Team,

 

I am trying to output the proc freq output of two datasets side by side using ODs PDF, but I am getting the first page as blank.

 

code :

 

ods pdf file='path.pdf' style=journal startpage=no;

ods layout gridded columns=2 advance=table column _width=(45% 45%);

 

ods region;

title "data1";

proc freq data=table1;

table unit*class/nopercent nocum norow nocol;

run;

 

ods region;

title "data2";

proc freq data=table2;

table unit*class/nopercent nocum norow nocol;

run;

ods layout end;

ods pdf close;

 

When I run the above code, I get the first page as blank. How do we avoid the black page in the output pdf.

 

 

 

1 REPLY 1
Cynthia_sas
Diamond | Level 26

Hi,

  When I run a slightly modified version of your code, I do not observe the same behavior. Here's my output:

Cynthia_sas_0-1744242190053.png

 

And here's my code:

options label orientation=portrait leftmargin=.10in rightmargin=.10in;

ods noproctitle;
  
ods pdf file='c:\temp\checkODS.pdf' style=journal startpage=no;
ods layout gridded columns=2 advance=table;
ods region;
  
proc freq data=sashelp.class;
title 'SASHELP.CLASS';
table sex*age/nopercent nocum norow nocol;
run;

ods region;
 
proc freq data=sashelp.classfit;
title 'SASHELP.CLASSFIT';
table sex*age/nopercent nocum norow nocol;
run;
ods layout end;
ods pdf close;

  So I'm not sure what is happening to cause your code to get a blank page. You might want to work with Tech Support on this.

 

  Personally, I don't like the look of PROC FREQ output side by side and I probably would have used TABULATE or REPORT instead.

 

Cynthia

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1194 views
  • 2 likes
  • 2 in conversation