This document is supplemental information for the FILESRV program. The purpose of this supplement is to demonstrate the steps necessary to serve a new file type and to give users the authorization to view the new type in a specified directory.
Create a libname test 'XXX', where XXX is specific to the operating system. This directory must have write privileges.
Run the following code:
proc sql; create table test.fsauth as select * from sashelp.fsauth; insert into test.fsauth set filetype='*', /* Specify e for an external file and c for a catalog entry. */ /* This value is not case-sensitive. */ path='`"*"' /* This value is case-sensitive only if the host operating environment */ /*honors case-sensitive filenames. See "Example authorization data set" */ /*at http://support.sas.com/rnd/web/intrnet/filesrv/examds.html */ ; quit; ods listing close; Title1 'Display of TEST.FSAUTH => after inserts'; ods html rs=none body=_webout(dynamic); proc print data=test.fsauth; run; ods html close; ods listing;
For an example of an authorization data set, see Example Data Sets.
ext='sas7bcat'
and indicating that the file is external. When the file is served, the
default name will be temp.sas7bdat.
Run the following code:
proc sql; create table test.fshead as select * from sashelp.fshead; insert into test.fshead set filetype='e', datatype='b' , ext='sas7bdat', header='Content-type: application/x-sas-data' set filetype='e', datatype='b' , ext='sas7bdat', header='Content-disposition: attachment; filename=temp.sas7bdat'; select * from test.fshead where ext='sas7bdat'; quit; Title1 'Display of TEST.FSHEAD => after inserts'; ods html rs=none body=_webout(dynamic); proc print data=test.fshead; run; ods html close; ods listing;
-insert SASHELP directory path
. The directory
path is the location where TEST.FSAUTH.sas7bdat and TEST. FSHEAD.sas7bdat
reside. This will cause the two files, TEST.FSAUTH.sas7bdat and
TEST.FSHEAD.sas7bdat, to take effect.
For example, a pool service definition, might include the SasCommand
, as follows:
SasCommand "\"G:\\sas\\v82\\sas.exe\" + \"D:\\WINNT\\Profiles\\xxxxx\\Personal\\My SAS Files\\V82\\IntrNet\\pool1\\appstart.sas\" + -insert SASHELP 'g:\\sas\\sasauth' + -rsasuser -nosyntaxcheck -noterminal -nolog
The path, g:\\sas\\sasauth
, is searched for FSAUTH and FSHEAD.
For additional information about SasCommand
, see
Configuration File Directives in the Application Dispatcher documentation.
Depending on how application servers are started at a site and where the updated FSAUTH.sas7bdat
and FSHEAD.sas7bdat reside, you might have to modify the SAS command. For example, if your site uses UNIX, you might need to modify the actual command that is being used to start the service, which is usually the start.pl script.
You can use the same technique as in the previous example for a UNIX Application Dispatcher by using the following in the SasCommand
:
-insert SASHELP '/usr/tmp/sasauth'
Run the FILESRV utility using either of the following:
The following is an example of invoking an external file of type .sas7bdat from an address line:
http://yourserver/cgi-bin/broker.exe?_SERVICE=default &_PROGRAM=sashelp.webprog.filesrv.scl&_FILETYP=e &_file=path\dataset.sas7bdat&_debug=0
This example assumes the following:
broker.exe
to be in the URL and not broker
)