BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Karlb
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

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

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

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

Karlb
Calcite | Level 5
Thank you very much Cynthia...the option is exactly what I was looking for. Sincerly Karl

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1266 views
  • 1 like
  • 2 in conversation