BookmarkSubscribeRSS Feed
Not applicable
I have two stored processes, both use ODS and produce HTML output.
The first process contains a submit button on the output which calls
the second. The second process contains a back button which I want to
use to return to the first process and rerun it.

My problem is that the results from the first process are cached in
the browser (IE6) and I want the first stored process to trigger again
and produce fresh output.

How can I achieve this?

I have tried using HTTP meta tags in the header (expires and pragma)
but this doesn't appear to be working.

Does the execute method make a difference; POST or GET?
I don't really think that GET or POST are the culprit here. I thought that the expires and pragma would work. Are you setting these with the STPSRV_HEADER function?

Here's an example:

If this is what you're trying (from the above example page) and it is not working, then you should open a track with Tech Support.


Example code:
You can set any HTTP record for your stored process output by calling the STPSRV_HEADER function. The following DATA step function calls generate the previous example header records:

old = stpsrv_header("Content-type",
"text/html; encoding=utf-8");
old = stpsrv_header("Expires",
"Wed, 03 Nov 2004 00:00:00 GMT");
old = stpsrv_header("Pragma", "nocache");
Not applicable
Hi Cynthia,

Thanks for the reply. This is my code:


%global _debug _odsoptions _odsstyle;

data _null_;
length rc1-rc3 $200;
rc1 = stpsrv_header('Expires','Thu, 18 Nov 1999 12:23:34 GMT');
rc2 = stpsrv_header('Cache-Control','no-cache,no-store');
rc3 = stpsrv_header('Pragma','no-cache');
put rc1= rc2= rc3=;



<< sas code >>


And this is the first few lines of the HTML source file

SAS Output
Not applicable
As it turns out the functions are working, It was just that I was looking for evidence of this in the wrong place. The header statements do not appear in the page source, but I think are actually some kind of 'server header'. If I supply the &_debug=trace option I can see them being written out under 'Getting return headers'.

The issue is that now upon going 'back' to the page IE6 reports that it has expired and does not automatically refresh it.

Anyone know if it's possible to get the page to be automatically resubmitted?

Many thanks.
You'll have to check with Tech Support on this -- but I think that you might have to reissue the original URL to run the SP again -- in order to get back to the execution page again.

Web pages and HTML generally work on the "request/response" model. The browser makes a request (run an SP); then the server responds (sends the results) -- at this point, one cycle of request/response has finished. It is now up to the browser to make another request. I'm confused though....if the browser is holding the SP results, where would the "BACK" button take the user???

The STPSRV_HEADER functions only apply to the SP results as they come down the "virtual pipeline" between the server and the client. If you are trying to get back to the page that invoked the SP -- and it was the SPWA (stored process web application) execution page -- you'll have to check with Tech Support whether there's a way to get back to the execution page without reinvoking the URL: http://SASStoredProcess/do?




Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.


Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 


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
  • 4 replies
  • 2 in conversation