BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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?
3 REPLIES 3
deleted_user
Not applicable
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;
Cynthia_sas
Diamond | Level 26
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
deleted_user
Not applicable
Thank you both for the info. The column option for the ods pdf is exactly what I was looking for!

Scot

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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