SAS 9.1.3 Integration Technologies » Developer's Guide


SAS Stored Processes
Software Requirements
Creating Stored Processes
Input Parameters
Result Types
%STPBEGIN and %STPEND
Reserved Macro Variables
Stored Process Server Functions
Sessions
Samples
Debugging
Converting SAS/IntrNet Programs
Using Stored Processes
Building a Web Application
SAS Stored Process Web Application
Configuration
Input
HTTP Headers
Embedding Graphics
Chaining Stored Processes
Using Sessions
Debugging
IOM Direct Interface Stored Processes
SAS Stored Processes

SAS Stored Process Web Application Configuration

The SAS Stored Process Web Application can be customized for your site through various configuration files and servlet initialization parameters.

Configuration Files

The following table describes the external files that are read by the SAS Stored Process Web Application.

File Description
Params.config contains stored process input parameters that are set before any client parameters are processed. The parameters are defined in the form name=value on a separate line with a '#' character in column one indicating a comment. Continuation lines can be specified with a '\' character at the end of a line. See the section about Web Application Properties for properties that can be substituted into input parameters in the params.config file. Parameters defined in the params.config file cannot be overridden.
Resources.properties contains name/value pairs for locale-defined output strings. This file is normally not altered.
Welcome.htm specifies an optional page to display when the SAS Stored Process Web Application is invoked with no parameters.

Initialization Parameters

The following table describes the initialization parameters that are available. Initialization parameters are values that are set when the SAS Stored Process Web Application is started. These parameters control various Web Application processing options. Initialization parameters are defined in the SAS Stored Process Web Application initialization area of the SAS Stored Process Web Application server.

Initialization Parameter Description
AuthMechanism specifies how users are authenticated when logging into the SAS Stored Process Web Application. This parameter is set to Trusted for Web authentication. If the AuthMechanism parameter is set to Trusted, then the Web server must set the remote user value or an error will be returned. See Changing to Trusted Web Authentication in the SAS Intelligence Platform: Web Application Administration Guide for a description of Web authentication.
Debug specifies default _DEBUG values.
DebugMask specifies the _DEBUG values that users are allowed to set. The default is to allow all keywords. Valid names can be specified as a comma-separated list.
InputEncoding specifies the default input character encoding, for example, utf-8.
OutputEncoding specifies the default output character encoding, for example, utf-8.
ParamsFile specifies the file that contains the preset input parameters. The default preset file name is Params.config in the SAS Stored Process Web Application root context directory.
PrivilegedUser specifies a stored process privileged user for pooled workspaces.
SessionTimeout specifies the number of seconds that elapse before a servlet session expires. The default session timeout is 900 (15 minutes).
WelcomePage specifies an HTML page to display if no parameters are entered in the URL. The value that you specify should be a fully expanded file specification. The default file name is Welcome.htm in the SAS Stored Process Web Application root context directory. If the welcome file cannot be read, the SAS Stored Process Web Application version and build number are displayed.

Web Application Properties

Various reserved values, or properties, are available to be passed as input parameters to stored processes executed by the SAS Stored Process Web Application. To pass a property to every stored process executed by the SAS Stored Process Web Application, add a line of the form name=$reserved_name to the params.config file. For example, to add request cookie information as an input parameter, add the following line to params.config:

   _HTCOOK=$servlet.cookies

The input parameter _HTCOOK is then created, containing the HTTP header cookie data. _HTCOOK is added to the input parameters for the stored process.

Note: Any unresolved values result in the corresponding parameter being set to a zero length string.

Reserved Name Recommended SAS Variable Name Description
servlet.auth.type _AUTHTYP specifies the name of the authentication scheme used to protect the SAS Stored Process Web Application, for example, BASIC or SSL, or null if the SAS Stored Process Web Application was not protected.
servlet.character.encoding   specifies the name of the character encoding used in the body of the request.
servlet.content.length   specifies the length, in bytes, of the request body and made available by the input stream, or -1 if the length is not known.
servlet.content.type   specifies the MIME type of the body of the request, or null if the type is not known.
servlet.context.path   specifies the portion of the request URL that indicates the context of the request.
servlet.cookies _HTCOOK specifies all of the cookie strings the client sent with this request.
servlet.header   specifies the HTTP request header as received by the SAS Stored Process Web Application.
servlet.header.accept _HTACPT specifies the MIME types accepted by the stored process client.
servlet.header.referer _HTREFER specifies the address of the referring page.
servlet.header.user-agent _HTUA specifies the name of the user agent.
servlet.header.<name>   specifies a particular HTTP request header line as received by the SAS Stored Process Web Application, where <name> is the header keyword name.
servlet.info   specifies any information about the SAS Stored Process Web Application, such as author, version, and copyright.
servlet.jsessionid   specifies the Java servlet session ID.
servlet.locale   specifies the preferred locale that the client will accept content in, based on the Accept-Language header.
servlet.method _REQMETH specifies the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.
servlet.name   specifies the name of this SAS Stored Process Web Application instance.
servlet.path   specifies the part of the request URL that calls the SAS Stored Process Web Application.
servlet.path.info   specifies any extra path information associated with the URL the client sent when it made this request.
servlet.path.translated   specifies any extra path information after the SAS Stored Process Web Application name but before the query string, and translates it to a real path.
servlet.protocol _SRVPROT specifies the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1.
servlet.query.string _QRYSTR specifies the query string that is contained in the request URL after the path.
servlet.remote.addr _RMTADDR specifies the Internet Protocol (IP) address of the client that sent the request.
servlet.remote.host _RMTHOST specifies the fully qualified name of the client that sent the request, or the IP address of the client if the name cannot be determined.
servlet.remote.user _RMTUSER specifies the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated.
servlet.request.uri _URL specifies the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request.
servlet.root   specifies the SAS Stored Process Web Application root context directory.
servlet.scheme   specifies the name of the scheme used to make this request, for example, HTTP, HTTPS, or FTP.
servlet.secure   returns true or false indicating whether this request was made using a secure channel, such as HTTPS.
servlet.server.name _SRVNAME specifies the host name of the server that received the request.
servlet.server.port _SRVPORT specifies the port number on which this request was received.
servlet.server.software _SRVSOFT specifies the Web server software.
servlet.user.name _USERNAME specifies the value for the user name obtained from the browser authentication.
servlet.user.password   specifies the value for the password obtained from the browser authentication.
servlet.version _VERSION specifies the SAS Stored Process Web Application version and build number.

There are numerous system properties (for example, user.name) that can be obtained. Setting _DEBUG to ENV will show all the available values.