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.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Rick Wicklin presents Ten Tips for Effective Statistical Graphics (with SAS code) on Wednesday March 26.
Register now at 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.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Rick Wicklin presents Ten Tips for Effective Statistical Graphics (with SAS code) on Wednesday March 26.
Register now at 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.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Rick Wicklin presents Ten Tips for Effective Statistical Graphics (with SAS code) on Wednesday March 26.
Register now at https://www.basug.org/events.
Linlin
Lapis Lazuli | Level 10

Thank you!!

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2125 views
  • 0 likes
  • 4 in conversation