BookmarkSubscribeRSS Feed
deleted_user
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?
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
HI:
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:
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/httphead.html

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.

cynthia

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");
deleted_user
Not applicable
Hi Cynthia,

Thanks for the reply. This is my code:



*ProcessBody;

%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=;

run;

%stpbegin;

<< sas code >>

%stpend;

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







SAS Output
deleted_user
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.
Cynthia_sas
SAS Super FREQ
Hi:
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?

cynthia

sas-innovate-2024.png

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

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
  • 1063 views
  • 0 likes
  • 2 in conversation