Help using Base SAS procedures

Proc Document

New Contributor
Posts: 2

Proc Document

Is it possible to import external files for manipulation using Proc Document? For instance importing a file that has previously been created and stored in C:/Table1.pdf to a new document store using ODS Document and Proc Document.
Super Contributor
Super Contributor
Posts: 3,174

Re: Proc Document

What would you want to do to the generated document? Be more specific.

Scott Barry
SBBWorks, Inc.
Posts: 8,743

Re: Proc Document

Think of an ODS DOCUMENT as the place when you store your ODS OUTPUT objects -before- they go into the final result file.

For example, you have an analytical job on some large SAS datasets that takes 10 hours to chug through all the analysis. The final output of the analytical job is an ODS PDF results file -- an external PDF file. It would be appropriate to store the OUTPUT objects from the 10 hours of analysis in an ODS DOCUMENT store.

What if, 3 weeks after you create the ODS PDF results file, your boss says that an RTF file of the analysis is needed. What do you do? Maybe you can't spend the 10 hours all over again to run the analytical job in order to create an ODS RTF file??? If you stored the output objects in an ODS DOCUMENT store, then you could simply REPLAY the output objects to ODS RTF (using the DOCUMENT window or PROC DOCUMENT) -- but WITHOUT needing to spend the 10 hours again.

So, it's like you've FROZEN the output objects or a copy of the output objects that went into the ODS PDF results file. When you need the output objects in another form or another structure, you can use the DOCUMENT window or PROC DOCUMENT to get the results you want. (REPLAY statement)

If you ONLY had the ODS PDF results file, you can't import that external proprietary results file back -into- an ODS DOCUMENT store. Right now, the only items that you can IMPORT into a document store are a SAS dataset or a graph segment, as discussed here:

And the only things that can be stored in an ODS DOCUMENT store are described in this CONCEPTS section of the documentation:

Sometimes people ask whether they can import an ODS PDF or ODS RTF file into a DOCUMENT store, because they think it will be a way to get around the fact that ODS does not provide a method of combining "already created" RTF and PDF result files. As described in this note and forum posting, you cannot combine previously created ODS PDF files together:

What was it you wanted to do with your TABLE1.PDF file that led you to hope that the results file could be imported into an ODS DOCUMENT store?

ps...for more information about ODS DOCUMENT stores, this SGF paper has some detailed examples
New Contributor
Posts: 2

Re: Proc Document

Thanks Cynthia, you answered my question and more. I was hoping to be able to combine previously created pdf files into one pdf using Proc Document.
Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation