BookmarkSubscribeRSS Feed
jerry898969
Pyrite | Level 9
I have two small data tables that I want to put side by side as one page within a pdf file and I can't find any code on how to do that?

This is the code i'm currently using
[pre]
ods printer pdf file= 'c:\test.pdf';

title 'test 1';
proc print data=test1 noobs width=minimum label;
run ;

title 'test 2';
proc print data=test2 noobs width=minimum label;
run ;

ods printer close;
run;
[/pre]

This puts them on seperate pages not side by side on the same page.

Any help would be appreciated.



Thank You
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
Hi:
What version of SAS are you using??? SAS 8.2?? SAS 9.1?? SAS 9.2??? The COLUMNS= option for ODS PDF should give you what you want. I'm not sure it was available in SAS 8.2 (I wonder about your version because ODS PRINTER PDF is an older way of invoking ODS PDF).

cynthia
[pre]
options nodate nonumber;
ods pdf file= 'c:\temp\testCOL.pdf' columns=2;

title 'test 1';
proc print data=sashelp.class noobs label;
where age ge 15;
var name sex age;
run ;

title 'test 2';
proc print data=sashelp.class(obs=6) noobs label;
var name age height;
run ;

ods pdf close;
[/pre]
jerry898969
Pyrite | Level 9
Cynthia,
Thank you so much for your response. That helped a lot.

I'm using SAS 9.2.

Thank You

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 3986 views
  • 0 likes
  • 2 in conversation