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