BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

Hi,

I'm working on a stored-process that  a user will call from the Stored Process Web App, and will specify the _odsdest as pdf or html.  Process is running on the Stored Process Server.

As I've been playing with this, it seems like half the time I run it (from internent explorer), the PDF opens in a new IE window.  I like that.

But other times I run it, IE pops up a file download box asking me if I want to save do.pdf to my local drive.  Less useful.  I would like users to see the pdf, then decide whether they want to save it or not.

So how can I force IE to display the pdf?  Is this somethig I need to set with stpsrv_header, or do I need to change the SAS results type to be package only (currently both package and streaming are checked).  Or do I need to write the pdf file to the server somewhere, and then somehow open it?

Is there a ways I can give a name to the pdf (rather than do.pdf)?

The code is basically:

%global _odsdest;

%stpbegin;

proc print data=sashelp.class;

run;

%stpend;

With user specifying _odsdest=HTML or PDF.  And I use Cindy Z's %SetOpts macro to set some of the options, based on output destination.

Maybe I'd be better off going back to good old "ods pdf" / "ods html", rather than using %stpbegin??

Thanks,

-Q.

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  Usually, you need to alter the STPSRV_HEADER to return PDF output using the SAS Stored Process Web App. In my paper, I did not show the use of STPSRV_HEADER because that macro was really only meant to give the general outline of how you would develop one stored process instead of 3 separate stored processes. And, the actual code was only ever submitted from SAS Enterprise Guide -- which did not need to have the STPSRV_HEADER set.

  Take a look at the code samples in this Tech Support note. You really would need to set STPSRV_HEADER for ODS PDF as shown here:

http://support.sas.com/kb/12/994.html

cynthia

View solution in original post

6 REPLIES 6
Cynthia_sas
SAS Super FREQ

Hi:

  Usually, you need to alter the STPSRV_HEADER to return PDF output using the SAS Stored Process Web App. In my paper, I did not show the use of STPSRV_HEADER because that macro was really only meant to give the general outline of how you would develop one stored process instead of 3 separate stored processes. And, the actual code was only ever submitted from SAS Enterprise Guide -- which did not need to have the STPSRV_HEADER set.

  Take a look at the code samples in this Tech Support note. You really would need to set STPSRV_HEADER for ODS PDF as shown here:

http://support.sas.com/kb/12/994.html

cynthia

Quentin
Super User

Thanks Cynthia.  STPSRV_HEADER did the trick.  Your papers have been a big help as I explore stored processes.  And your ODS book holds a treasured space on my desk (I use it too often to bother puting it back on my shelf. : )

--Q.

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Linlin
Lapis Lazuli | Level 10

Hi,

Which book are you talking about? I need to buy one too.

Thanks - Linlin

Quentin
Super User

"Output Delivery System: The Basics and Beyond", by Lauren Hayworth, Cynthia Zendler, and Michele M. Burlew.  Really good stuff.

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Linlin
Lapis Lazuli | Level 10

Thank you!!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 6 replies
  • 1502 views
  • 0 likes
  • 4 in conversation