Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next
 

Common Environment Variables

The following table from the sample configuration file lists some standard CGI environment variables. However, you can pass any variables that your Web server supports. (For more information about environment variables, see the CGI area at the World Wide Web Consortium Web site.)

Note: These SAS macro variable names are suggestions only; you do not need to use these exact names.

Environment variables SAS macro variable Description
GATEWAY_INTERFACE _GATEWAY Version of the Common Gateway Interface (CGI) that the Web server uses.
SERVER_NAME _SRVNAME Web server's DNS (host) name or IP address.
SERVER_SOFTWARE _SRVSOFT Web server software name and version.
SERVER_PROTOCOL _SRVPROT Name and revision of the HTTP information protocol transmitting the client request.
SERVER_PORT _SRVPORT Web server port number.
REQUEST_METHOD _REQMETH Method with which the information request was issued, for example, GET or POST. This corresponds with the <FORM...METHOD=GET|POST> statement in the HTML form.
PATH_INFO _PATHINF Extra path information after the script passed to a CGI program.
PATH_TRANSLATED _PATHTRN Local filename of PATH_INFO.
SCRIPT_NAME _SCRIPT Virtual path of the script being executed. In this case, a duplicate of _URL, another macro variable passed to the Dispatcher program.
DOCUMENT_ROOT _DOCROOT Directory from which Web documents are served. This variable is unreliable.
QUERY_STRING _QRYSTR Query information passed to the program. It is appended to the URL with a ?. In this case, an unparsed version of the user macro parameters. Set only with GET.
REMOTE_HOST _RMTHOST User's DNS (remote host) name, if known.
REMOTE_ADDR _RMTADDR User's IP address.
AUTH_TYPE _AUTHTYP Authentication method used to validate a user, usually Basic.
REMOTE_USER _RMTUSER Username, if authenticated.
REMOTE_IDENT _RMTID Identification of user making request. RFC931 ID, if supported.
CONTENT_TYPE _CONTTYP The Internet media type (MIME type) of the query data. Set only with POST.
CONTENT_LENGTH _CONTLEN Length of the data (in bytes or number of characters) passed to the CGI program. Set only with POST.
HTTP_FROM _HTFROM E-mail address of the user making the request. (unreliable)
HTTP_ACCEPT _HTACPT Internet media (MIME) types that the client can accept. However, you may find using the HTTP_USER_AGENT variable more reliable than HTTP_ACCEPT.
HTTP_COOKIE _HTCOOK Cookies. See also the Set-Cookie header line.
HTTP_USER_AGENT _HTUA Browser name.
HTTP_REFERER _HTREFER If known, the URL of the document that the client points to before accessing the CGI program.

Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next