Date: Thu, 29 Feb 1996 08:40:06 -0600
Reply-To: Larry Hoyle <l-hoyle@UKANS.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Larry Hoyle <l-hoyle@UKANS.EDU>
Organization: IPPBR, University of Kansas
Subject: Re: SAS as a WWW helper app?
Michael Friendly wrote:
> Has anyone figured out how to serve .sas files from a www server and
> have the browser run the file in SAS as a helper app?
> Using Netscape in Windows with SAS 6.10:
> - The .sas extension is registered with FileManager so that
> double clicking on a .sas file successfully starts SAS
> and runs the file. The registration info associates .sas
> sas=k:\apps\sas\sas.exe -initstmt "%include '^.sas';"
> However, Netscape merely displays a .sas file served from a web doc
> as text in the browser window. OK, so I defined a mime type
> application/x-sas in Netscape preferences for the .sas extension,
> with action to launch SAS, but the result is the same.
> What am I missing? Is is necessary for the server to serve the
> file as mime type application/x-sas? It would be useful for
> people who have done this to describe how they did it to this
> list -- setups for the client and the server.
I think this is the problem. Your server needs to be configured to serve files
".sas" as "application/x-sas".
If you can't do this there is another less pleasant alternative. You could use
cgi script with something like the following:
if [ $REQUEST_METHOD = "GET" ]
# send back the form
When a get is done on the shell script "foo" it looks to see if the request was
a "get" and sends back the sas file "foo.sas".
A note of caution. If you set up a MIME type for sas jobs ad cause them to be
automatically on your machine you could be opening yourself up to a trojan
> Michael Friendly Internet: email@example.com (NeXTmail
> Psychology Department
> York University Voice: 416 736-5118
> 4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html
> Toronto, ONT M3J 1P3 CANADA
Larry Hoyle | lat/long: 38.57.24 / 95.14.36 \
Institute for Public Policy | --> * <
and Business Research | Voice: (913) 864-3701 |
University of Kansas | FAX: (913) 864-3683 |
607 Blake Hall | mailto://firstname.lastname@example.org |
Lawrence, KS 66045-2960 | http://www.ukans.edu/cwis/units/IPPBR |