The SAS Output Delivery System and reporting techniques

Producing PDFs per by-Group

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Producing PDFs per by-Group

Hi


I generate a series of PDFs by defining a macro containing some procedures and the PDF definition. Within the macro data to be reported are subsetted for each by-value. Finally the macro is executed with call execute for each by-value.
 

Program is like this...

 

%macro writepdf (byvalue);

ODS PDF body="&byvalue..PDF"; * one PDF for each by-value;

proc print data=LISTDATA; where Var1="&byvalue"; run;

ODS PDF close;

%mend;

 

Data _null_; set BYVALUES;

Call execute('%writepdf(' !! byvalue !! ')');

run;

 

Is there any faster -more direct- way to produce the PDFs per by group (without multiple reading the LISTDATA-dataset)?

 

Thanks for all answers,

Karl


Accepted Solutions
Solution
‎01-05-2017 04:00 PM
SAS Super FREQ
Posts: 8,641

Re: Producing PDFs per by-Group

Hi, well before I go down the macro road, I usually try ODS PDF with the NEWFILE= option. I usually only use Macro processing if I need to control the names of the output PDF files.

 

cynthia

newfile_pdf.png

View solution in original post


All Replies
Solution
‎01-05-2017 04:00 PM
SAS Super FREQ
Posts: 8,641

Re: Producing PDFs per by-Group

Hi, well before I go down the macro road, I usually try ODS PDF with the NEWFILE= option. I usually only use Macro processing if I need to control the names of the output PDF files.

 

cynthia

newfile_pdf.png

New Contributor
Posts: 3

Re: Producing PDFs per by-Group

Thank you very much Cynthia...the option is exactly what I was looking for. Sincerly Karl
Post a Question
Discussion Stats
  • 2 replies
  • 216 views
  • 1 like
  • 2 in conversation