Help using Base SAS procedures

how to have two data tables side by side using ODS PDF?

Reply
Super Contributor
Posts: 398

how to have two data tables side by side using ODS PDF?

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
SAS Super FREQ
Posts: 8,745

Re: how to have two data tables side by side using ODS PDF?

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]
Super Contributor
Posts: 398

Re: how to have two data tables side by side using ODS PDF?

Cynthia,
Thank you so much for your response. That helped a lot.

I'm using SAS 9.2.

Thank You
Ask a Question
Discussion stats
  • 2 replies
  • 664 views
  • 0 likes
  • 2 in conversation