BookmarkSubscribeRSS Feed
libragirl9
Calcite | Level 5

Hi, 

 

I need to have a listing of subjects and their treatments by site. I did proc freq by site and got the tables that I need in the results window, but I need them to be outputted in indvidual rtf files so each rtf contains info specific for that site.

 

Any suggestions on how to go about this would be greatly appreciated!

Thanks!! 

 

 

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Sounds like you are generating clinical tables?  If so check with your company for standards, macros and such like.  You can output certain objects that freq creates - you can see what objects are created by:

ods trace=on;

proc freq...

ods trace=on;

 

In the log you will see the objects.  You can now save these by:

ods output <object>=<dataset>;

proc freq...

 

Then you can use that dataset as you want, i.e. proc report and such like.  You will want to add titles/footnotes, apply a template, specify filetype etc.

BrunoMueller
SAS Super FREQ

Hi

 

Have a look at the NEWFILE= option of the ODS RTF statement. This will help you to achieve what you want.

 

If you need more control on the naming of the RTF files have a look at this blog post http://blogs.sas.com/content/sasdummy/2012/03/20/sas-program-by-processing/ by @ChrisHemedinger This programming pattern can be used over and over.

 

Bruno

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