The SAS Output Delivery System and reporting techniques

Mainframe ODS PDF output with image(s)

Reply
N/A
Posts: 0

Mainframe ODS PDF output with image(s)

I am having problems with producing a PDF using ODS OO, from the mainframe, with an image included.

The example I used was from SUGI28 "Next Generation Data _NULL_ Report Writing Using ODS OO Features" by Daniel O'Connor" - example 3.3 from the downloaded zip file.

The PDF document itself displays correctly but I can't get a .gif or .jpg from the mainframe to display - I have used another PDF report generator (TXT2PDF) to verify that the image file is not corrupt.

The message from the log is "Unable to load image "any.gif": default image will be used" which results in a question mark in a green circle being displayed.

Image is specified as follows:

obj.region(column: 1);
obj.image(text: "any.gif", overrides: "just=Left vjust=top" );

In the original article the logo "Seattle.gif" may have been created using SAS/GRAPH.

I have two questions:

1. Can SAS only load image files that it has created.

2. If not does the image have to be in a special format for SAS - if so could anyone let me know how to go about converting an existing image to that format.
SAS Super FREQ
Posts: 8,866

Re: Mainframe ODS PDF output with image(s)

Posted in reply to deleted_user
Hi-- this may be a question for Tech Support. The image you use does NOT have to be from SAS/Graph. For example, let's say you have a corporate logo that you want to insert into ODS output. In general, the way images work in ODS is this:

HTML -- ODS builds an IMG tag, so the image location MUST be the location that will be used when the HTML page is rendered

PDF and RTF -- ODS does NOT build an IMG tag for these destinations. The images are converted to an internal format appropriate to the destination. BUT, this means that the location of the image you're using MUST be the place where the image is stored WHEN the PDF or RTF file is created.

I do not remember the destination that was being illustrated in the paper that you referenced, however, by the reference method (filename.filetype), I believe that demo was run on a Windows or Unix system and the image file was in the same directory where the output file was being created. If you were creating the PDF file on the mainframe, then the image has to be available on the mainframe to be loaded when the PDF file is created.

Also, this Tech Support note explains that for PDF, the name you specify must be an absolute reference (not a relative "filename.filetype")
http://support.sas.com/faq/045/FAQ04502.html

There are a couple of issues in general with the creation of PDF files on the mainframe (since PDF is a proprietary file type) and you have to FTP the output back to a platform that has Acrobat Reader or some other software for rendering the PDF output. But at the point where the rendering software is involved, the image has ALREADY been embedded in the PDF file in internal PDF format.

Tech Support can help you with these issues and let you know whether it's still appropriate to use the techniques outlined in that paper. The techniques were very experimental when the paper was written.
cynthia
N/A
Posts: 0

Re: Mainframe ODS PDF output with image(s)

Posted in reply to Cynthia_sas
Thanks for the response - I'll try Tech Support
N/A
Posts: 0

Re: Mainframe ODS PDF output with image(s)

Posted in reply to Cynthia_sas
Hi Cynthia,

Thought you might like to know that Tech Support were able to resolve the issue for me. Without going into too much detail it seems that the only way to use images from the mainframe is to store them in a UNIX System Services HFS file and then specify the path as '/u/usr/images/any.gif' (for example) in the image statement.

Regards

Mike
SAS Super FREQ
Posts: 8,866

Re: Mainframe ODS PDF output with image(s)

Posted in reply to deleted_user
Thanks for sharing the outcome. That's good to know! I'm convinced that, collectively, Tech Support knows everything about SAS and different platforms and....who knows what else...
cynthia
Ask a Question
Discussion stats
  • 4 replies
  • 532 views
  • 0 likes
  • 2 in conversation