BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I routinely need to generate pdf files containing program, log and output results. I am wondering if someone has had the code to automate it. If pdf is not an easy one, can a single file be generated in other formats?

Thanks.
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Interactive SAS sessions? Batch? Daily production runs on an unattended server-class machine, or SAS adhoc queries/sessions? What OS is SAS running-on? Is SAS running locally or on a server? Have you looked at using ALTLOG and ALTPRINT SAS system options to create a copy of your process output?

You could always batch-process the results of a SAS session, writing the results to a "concatenated" PDF-format file, using SAS ODS. Or possibly you may find a suitable solution with a "PDF maker" utility function, operating in conjunction with the SAS system on a machine/workstation.

Scott Barry
SBBWorks, Inc.
Cynthia_sas
SAS Super FREQ
Hi:
As Scott says, there are a lot of unknowns in your question. Have you searched for previous forum postings? I know that this question has come up before and I have posted code several times. The topic titles were something like:
"Adding syntax at the end of ODS output"
and
"SAS log in ODS format" or "SAS log in RTF format" (or HTML or PDF)

A search on these topics should help you figure out whether a SAS approach or a 3rd party or Adobe approach is the way to go. In these previously posted programs, the end result would have been 2 separate PDF files -- one PDF file with the report output and one, separate, PDF file with the program/log output.

Generally, the issue with the "all-in-one" file approach -- where you have the report, the program (.SAS) file -and- the log (.LOG or .TXT) file all together is that although you can use ODS PDF to create the report output, you normally need to use "post-processing" techniques to get the .SAS file and the .LOG file into another, separate, PDF.

There are no SAS techniques to allow you to combine already-created PDF files, so unless you use ODS DOCUMENT to capture your report output objects and the .SAS file and the .LOG file into a DOCUMENT store, you are probably looking at the 3rd party PDF creation route.

cynthia

sas-innovate-2024.png

Today is the last day to save with the early bird rate! Register today for just $695 - $100 off the standard rate.

 

Plus, 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
  • 899 views
  • 0 likes
  • 3 in conversation