Say I have the following:
ods pdf file='c:\temp\samp1.pdf';
ods pdf file='c:\temp\samp2.pdf';
data _null_;
set sashelp.class;
file print <....something to point to the first pdf file> ods=(template="mygraphs.template1");
put _ods_;
file print <...something to point to the second pdf file> ods=(template="mygraphs.template2");
put _ods_;
run;
ods pdf close;
We have available the id= construct on the ods pdf statement but am not sure that can be tied to a specific file print statement. I found I can dynamically generate an ODS PDF statement via a user defined function that calls a macro which submits the statement, so I can generate them from within a data step. Trying to close them within that same data step is a different story, but could do that after the data step terminated.
The end goal is to generate a 4 page pdf file for about 20,000 companies. I was hoping to use a Data step to avoid something like calling Proc Document 20,000 times in an ODS sandwich after generating the graphics to a document store. I wouldn't press my luck by allocating 20000 PDF files in SAS, but probably would do it in batches of 50 or 100 with an ODS PDF close statement in between the DATA steps.
--Ben
... View more