The SAS Output Delivery System and reporting techniques

Output singular column as multiple columns on one page

Reply
N/A
Posts: 0

Output singular column as multiple columns on one page

I have a list of IDs only that I am trying to output on one page rather than have one column across multiple pages. What is the best way to do this?
N/A
Posts: 0

Re: Output singular column as multiple columns on one page

Posted in reply to deleted_user
are you prepared to have it in listing style result ? That would be something like [pre]
data _null_ ;
file print ;
put 'list of IDs' ;
do while( not end_of_data ) ;
set dataset_of IDs end= end_of_data ;
put id +2 @@ ;
end;
stop;
run;
SAS Super FREQ
Posts: 8,864

Re: Output singular column as multiple columns on one page

Posted in reply to deleted_user
Hi:
It really depends on your destination of choice. If you need only the LISTING destination, then you could use PROC REPORT with the PANELS= option:
[pre]
ods listing;
proc report data=mydata nowd panels=3;
title 'Multi Column LISTING';
column id name;
define id / order;
run;
[/pre]

But PANELS= is a LISTING only option. If you wanted RTF or PDF, then you could use the COLUMNS= option to get multiple columns of output.
[pre]
ods pdf file='mult_col.pdf' columns=3;
ods rtf file='mult_col.rtf' columns=3 notoc_data;
[/pre]


I think that for HTML, you'd have to experiment with the HTMLPANEL tagset template or use a DATA step program. The general outline for an HTMLPANEL program would be:
[pre]

options orientation=portrait;
%let panelcolumns = 3;
ods tagsets.htmlpanel file='mult_col.html'
style=sasweb;

ods tagsets.htmlpanel event=panel(start);
** first procedure possibly with WHERE for IDs in first col;

** second procedure with WHERE;

** third procedure with WHERE;
ods tagsets.htmlpanel event=panel(finish);

ods _all_ close;
[/pre]

Or you can have HTMLPANEL work with BY groups, but that means you'd have to set a variable that said which column an ID would go into.

For more information on HTMLPANEL, consult this web site:
http://support.sas.com/rnd/base/ods/odsmarkup/htmlpanel.html

cynthia
N/A
Posts: 0

Re: Output singular column as multiple columns on one page

Posted in reply to Cynthia_sas
Thank you both for the info. The column option for the ods pdf is exactly what I was looking for!

Scot
Ask a Question
Discussion stats
  • 3 replies
  • 194 views
  • 0 likes
  • 2 in conversation