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
SAS Super FREQ
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1002 views
  • 0 likes
  • 2 in conversation