The SAS Output Delivery System and reporting techniques

ODS PDF Options are Not Working

Reply
Occasional Contributor
Posts: 11

ODS PDF Options are Not Working

I'm new to SAS, and I'm using SAS Enterprise Guide 4.3 with SAS 9.2 on Windows. I'm confused about using the ODS PDF driver. I can create great plots using SGPLOT, but any ODS options that I try using are ignored.

For instance, in the following code, The title refuses to print. The graph looks fine otherwise.

options nodate nonumber;

ods pdf file="&PDFOUTPUTFILEGRAPHPHYSCPUUSAGE";

proc sgplot data=WORK.SORTTempTableSorted2; 

Title "&HOSTNAME - &REPORTTITLE1"; 

band x=dt1 lower=0 upper=pctwio / legendlabel='%WIO'; 

band x=dt1 lower=0 upper=pctusr / legendlabel='%User'; 

band x=dt1 lower=0 upper=pctsys / legendlabel='%Sys'; 

band x=dt1 lower=0 upper=pctnice / legendlabel='%Nice'; 

band x=dt1 lower=0 upper=pctsteal/ legendlabel='%Steal'; 

XAXIS LABEL= 'Timestamp'; 

YAXIS LABEL= '%';

RUN;

Any help is appreciated.

SAS Super FREQ
Posts: 8,820

Re: ODS PDF Options are Not Working

Hi:

  I don't understand what you mean by ODS OPTIONS? What options did you try that were not used. The only ODS statement you show is the ODS PDF statement. There are NO other ODS STATEMENTS in your code. I no longer have SAS 9.2 to test with, but when I ran the test code using SGPLOT I do see my Wombat - Title in the Title area of the graph. See the attached screen shot. If you are not seeing the same thing, then it might be something specific to 9.2 or it might be something else. ODS GRAPHICS were first introduced in 9.2, so there is a chance that the TITLE statement behaved differently, but I don't remember having issues with the TITLE statement. But, Tech Support can test the code in 9.2 and help you figure out what options you want to add/use.

  I notice you are using a dataset of WORK.SORTTempTableSorted2 which looks like an Enterprise Guide generated name. The other possibility is that there is something in your project or EG options or EG additional code that is not being honored. Again, a question for Tech Support.

Cynthia

options nodate nonumber;

%let hostname = Wombat;

%let REPORTTITLE1 = Title;

 

ods pdf file="c:\temp\trytitle.pdf";

 

proc sgplot data=sashelp.class; 

Title "&HOSTNAME - &REPORTTITLE1"; 

  scatter x=height y=weight;

  XAXIS LABEL= 'Timestamp'; 

  YAXIS LABEL= '%';

RUN;

ods _all_ close;


see_title_my_pdf.png
Occasional Contributor
Posts: 11

Re: ODS PDF Options are Not Working

Hi Cynthia,

Thanks so much for responding. You were right. It was something specific to Enterprise Guide. I had to set the "Results Format" to use PDF as its default. In EG, "Tools" ==> "Options" ==> "Resuts General" and set the "Results Formats to include PDF.

I found that in this article: http://support.sas.com/resources/papers/proceedings12/145-2012.pdf

Thanks for your help!!

Ask a Question
Discussion stats
  • 2 replies
  • 434 views
  • 0 likes
  • 2 in conversation