The SAS Output Delivery System and reporting techniques

ODS ESCAPECHAR causes the procedure output to vanish in ODS PDF

Reply
Super Contributor
Posts: 260

ODS ESCAPECHAR causes the procedure output to vanish in ODS PDF

Hi all.
I recently ran into something quite weird. Say you want to create PDF output with ODS ; this document will consist in a Freq procedure output (note to Cynthia : I've tried with proc Report, but the problem remains). The code works out fine. I then try to add improvements to the document, using ODS ESCAPECHAR. Adding an image (such as company logo) at the beginning of the page with a TITLE statement and ODS ESCAPECHAR still works out fine.
[pre]
ODS ESCAPECHAR = "^" ;
ODS PDF FILE="c:\temp\output.pdf" ;
TITLE1 '^S={PREIMAGE="c:\temp\logo.gif"}' ;
PROC FREQ DATA = sashelp.class ;
TABLE age ;
RUN ;
TITLE ;
ODS PDF CLOSE ;
[/pre]
It becomes weird when I add a customized title or footnote, still using ESCAPECHAR, something like "Page 1 on a total of 3". Adding it as a TITLE2 will make the image disappear, while adding it as a FOOTNOTE will make the procedure output disappear !
[pre]
ODS ESCAPECHAR = "^" ;
ODS PDF FILE="c:\temp\output.pdf" ;
TITLE1 '^S={PREIMAGE="c:\temp\logo.gif"}' ;
FOOTNOTE1 "Page ^{thispage} on a total of ^{lastpage}" ;
PROC FREQ DATA = sashelp.class ;
TABLE age ;
RUN ;
FOOTNOTE ;
TITLE ;
ODS PDF CLOSE ;
[/pre]
Some tests showed that the problem only exists in PDF, and the log says something like : "No logical assign for Filename []".
Any ideas, anyone ?
Thanks in advance.
Olivier
SAS Super FREQ
Posts: 8,868

Re: ODS ESCAPECHAR causes the procedure output to vanish in ODS PDF

Hi, Olivier:
This is the full text of the error message that I got:
[pre]
ERROR: No logical assign for filename .
ERROR: Internal error on replay for "page i of n" processing. Could be caused by out of memory, out of disk space, or internal coding error. Check for other
error messages above indicating probable user error or resource constraints; if there are none, or if they make no sense, please report this message
and provide a test program to SAS Institute.

[/pre]

The only POSSIBLE thing I could think of was that OUTPUT.PDF was being used for FILE= for both outputs and that possibly a "ghost" Acrobat process was holding that name open. But I still got the message when I changed the name.

I recommend contacting Tech Support with your program.

cynthia
Super Contributor
Posts: 260

Re: ODS ESCAPECHAR causes the procedure output to vanish in ODS PDF

Hi Cynthia, and thank you for the answer.

Yes, this is exactly the message I got, but as my SAS session is in French, I didn't take the time to translate it.
Your "ghost PDF" hypothesis does not sound bad, but how come it works without the {thispage} part ? If there was a conflict between ODS PDF and the PREIMAGE style attribute, it would happen with and without the FOOTNOTE statement.

I have contacted the SAS Support yesterday, still waiting for an answer (if any, I will post it there).

Olivier
Super Contributor
Posts: 273

Re: ODS ESCAPECHAR causes the procedure output to vanish in ODS PDF

Olivier make allusion to the fact he is working in french
and i was following this trend.
But i have a more general remark who (which?) is just applying to
the appearance of the trend

Both Olivier and Cynthia have written very long messages upon their screen
(without line break) and the conclusion is
if ianybody want to keep a paper copy of an interesting solution
he has difficulties even in reduced view before printing as at 30% reduce
the end of the lines are cutted.
In landscape mode it happen me in the past on this forum
having twice impossibility to print as reducing at 20% was not more readable
and the end of the line were yet cutted.

So if some explicit councel to writer could appear to avoid TOO LONG LINES
and with also the trick [PRE] [\PRE]

Many thanks Cynthia for a direct answer (wielki@ined.fr)
SAS Super FREQ
Posts: 8,868

Re: ODS ESCAPECHAR causes the procedure output to vanish in ODS PDF

Hi, Andre:
When I'm pasting in code, I do try to use
[-pre-] and [/-pre-] (without the -) around the code
(which typically makes the lines shorter).

But, I have to admit, I never thought about the possibility
of people wanting to print the messages. So I typically
don't put manual "carriage returns" or "hard returns"
into my responses. The ability to search the forum
postings electronically seems a better ability, to me,
than flipping through hard copy paper. However,
I will try to be aware of overly long lines in the future.

Thanks for the insight into how you use the forums.

cynthia
SAS Employee
Posts: 50

Re: ODS ESCAPECHAR causes the procedure output to vanish in ODS PDF

We have some internal logic errors when using images with Page x of y. I could get into the nitty gritty details with you but let's just say it's a problem that we know about and are working diligently on to fix ASAP.
Super Contributor
Posts: 260

Re: ODS ESCAPECHAR causes the procedure output to vanish in ODS PDF

Thank you Scott.
I was afraid I was missing something important, since there was no SAS Note in the Knowledge Database I could take trace of.
I'll wait for any circumvention or fix as it comes out.

Olivier
Ask a Question
Discussion stats
  • 6 replies
  • 255 views
  • 0 likes
  • 4 in conversation