A prior thread noted the following article for doing this https://forums.adobe.com/thread/1524493, but it no longer exists. What techniques are available to do this in SAS?
I wouldn't use SAS to manipulate PDF files. You might look at using Acrobat for that. https://helpx.adobe.com/acrobat/using/merging-files-single-pdf.html?mv=product&mv2=acrobat
Using this method is ok for a small number of files, but I have many that need to have PDFs appended. So rather than have duplicate runs of the same reports, I prefer to append sets together. Can this be done?
@Doug____ wrote:
Using this method is ok for a small number of files, but I have many that need to have PDFs appended. So rather than have duplicate runs of the same reports, I prefer to append sets together. Can this be done?
Are your reports generated in SAS?
If so and you want them in a single document then why are you creating multiple PDF's? You can put many output generating procedures into a single ODS destination, such as PDF.
ods pdf <pdf options>;
<many procs that generate output for the document>
ods pdf close;
This is not what I want to do as this will make the same reports run more than once in two different packages which would cause the project to run much longer than it does (not desirable). For the last stage I want to take two existing sets of PDFs and append them together without having to create the same reports twice in SAS.
"Package" is a pretty imprecise descriptor.
Do these "packages" involve steps like reading raw data and manipulation before generating output?If so you might consider splitting things into a "data preparation" part where all of the data needed is created one time and stored in an appropriate library (or more if needed). Then have a separate "report" part that uses the data.
You might also find that having these generated data sets available makes other ad hoc analysis/ reports easier.
And what specific procedures are generating the output? And how much time (look at logs or similar) do the actual report generators take?
The reports are generated using PROC REPORT and take about 3 hours to complete. I do not want a manual process because manual steps tend to be forgotten from time to time. This needs to be done automatically so the operator does not have to do anything post-hoc.
@Doug____ wrote:
The reports are generated using PROC REPORT and take about 3 hours to complete. I do not want a manual process because manual steps tend to be forgotten from time to time. This needs to be done automatically so the operator does not have to do anything post-hoc.
So the combined run time of ONLY the Proc Report calls is 3 hours? Or are you including other data prep time in that total?
Nothing I mentioned is a "manual" step.
But if all of these are done at one time perhaps you could investigate Proc Document that can manipulate the SAS output objects to combine them after generation into a single document.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.