The SAS Output Delivery System and reporting techniques

Logo in mainframe pdf report

Reply
Contributor
Posts: 21

Logo in mainframe pdf report

How can I get a logo into a pdf report with mainframe?

Ods pdf text='(*ESC*)S={"/path/logo.jpg"}';

doesn't put the logo into the document even tough the logo reference on the proc report heading does that.
Super User
Posts: 11,343

Re: Logo in mainframe pdf report

I think you need to define a single escape character for SAS to send the right bits to pdf. Something like:

ODS ESCAPECHAR = '^';

Ods pdf text= '^S={"/path/logo.jpg"}';
SAS Super FREQ
Posts: 8,868

Re: Logo in mainframe pdf report

Hi:
When creating an ODS PDF or RTF file, the location of any image must be the physical location of the image when the PDF or RTF file is -created- ... so you must be certain that /path/logo.jpg is indeed the correct MAINFRAME path location for the logo. (...since any graphic images are converted to internal PDF or RTF format when the file is created, if the file is created on the mainframe, then the image file location must be accessible to the mainframe.)

The (*ESC*) method of specifying the ESCAPECHAR is the "universal" method (as opposed to the one character method) -- so that's OK. The issue, I think, partly depends on the version of SAS that you're using (there were issues in creating PDF files with ODS in SAS 8 and early SAS 9 that no longer exist in SAS 9.2); whether you are indeed specifying the image location correctly -- what you are specifying looks like a UNIX file location, so I'm assuming that you might be trying to pull the image from an AIX drive or Unix web server?? If so, you have to be sure that the server is available to your SAS job --when it runs-- (not when you open the file).

You might end up needing to work with Tech Support on this, they could actually test the code on a mainframe configuration.

cynthia
Contributor
Posts: 21

Re: Logo in mainframe pdf report

Posted in reply to Cynthia_sas
The strange part in this seems that I can get the logo into proc report title (with style(report)={preimage}-definition) or with data _null_-step and the logo path on column header or data section but not with ods pdf text-statement.

So the path to the logo should be OK as it can be seen when on columnheader, reportheader or in columndata.
SAS Super FREQ
Posts: 8,868

Re: Logo in mainframe pdf report

Hi:
Well, it seems like the main difference might be that you're not using ESCAPECHAR in the PROC REPORT style override, but you are using ESCAPECHAR in the TITLE statement???

That definitely seems like a puzzle for Tech Support.

cynthia
Super Contributor
Super Contributor
Posts: 3,174

Re: Logo in mainframe pdf report

Posted in reply to Cynthia_sas
Your code needs to be explicit with preimage= or postimage= as well as what Cynthia mentioned about specifying an accurate zFS/HFS location for your image (jpg) file. This code works for a z/OS (IBM mainframe) generated PDF document:


ods pdf file="/u/websrv/perf/test/test_ods.pdf";
%let txt = This is my Title.....See Me Roar;
ods pdf text="^S={preimage=""/u/websrv/images/corp_logo1.jpg""} &txt";
ods pdf close;


Scott Barry
SBBWorks, Inc.
Contributor
Posts: 21

Re: Logo in mainframe pdf report

Most strangest thing in this logo is that I have a logo in another report, the code is run from JCL and it is located on unix directory. There I have code like:

ods escapechar= '?';
ods pdf text="?S={just=right preimage=
'/SYSTEM/var/Subdirectory/File/Logo.gif'}";

But when I run the same code on mainframe SAS (interactive session) there is no logo, only text. The same happends when the code is on MVS and the code is run trough JCL.
Super Contributor
Super Contributor
Posts: 3,174

Re: Logo in mainframe pdf report

You will need to ensure that the USS HFS/zFS filesystem is accessible from any/all z/OS MVS systems where you can run SAS. I support a client where SAS is only licensed on one machine for sub-capacity licensing reasons, and so when I am accessing the USS filesystem contents through the mainframe browser, the URL prefix is different -- dedicated zFS for the SAS-licensed LPAR.

Scott Barry
SBBWorks, Inc.
Contributor
Posts: 21

Re: Logo in mainframe pdf report

The logo is to be seen on proc report heading, not with ods pdf text.
Super Contributor
Super Contributor
Posts: 3,174

Re: Logo in mainframe pdf report

Suggest you reply to your post and COPY/PASTE your SAS-generated log with expanded code and all SAS diagnostic messages so that you can get the most effective feedback.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 9 replies
  • 350 views
  • 0 likes
  • 4 in conversation