Previous Topic Table Of Contents Next Topic |  | # WWW Event-Related Variables ## How They Work Each time an inbound HTTP request is received by the Shadow OS/390 Web Server subsystem, the system parses the HTTP request header to determine which event procedure to run. During the parse operation, various data items are extracted from the inbound HTTP request, along with other environmental data elements, which are made available to WWW rule transaction procedures. Transaction procedures can use these values in composing an HTML response. Shadow/REXX procedures can access these run-time values, by name, using the variable names given in the table below. The variables are automatically set up in the REXX-language environment before a Shadow/REXX procedure is executed. User-written programs or REXX procedures executed by other (not Shadow/REXX) interpreters must use an API interface call to retrieve the value of these run-time variables. Use the SWSVALUE API Call for user-written high-level language program access, or the SWSVALUE built-in function for non-Shadow/REXX interpreters. You can see a demonstration of how a Shadow/REXX procedure is invoked and can make use of these run-time variables by accessing the sample procedure /neon/demo01.
Variable Name | Contents
--- | ---
PHASE | Contents: Contains a four-byte character constant which indicates the processing phase for which the current event procedure was invoked. Possible values are: "INIT". The procedure is either enabled during subsystem start-up or in response to a user enable request. "PROC". The procedure is run after being matched to an inbound HTTP transaction request. "TERM". The procedure is either disabled during subsystem shut-down, or in response to a user disable request. During procedure enablement and disablement, the only other variable that is instantiated is WWW.USER. The remaining variables are only instantiated during "PROC" phase processing. Note: REXX procedures normally run only during the PROC phase, unless explicitly requested. Data Type: Character, Read-only
WWW.ABENDCODE | Contents: The decimal value of the last encountered abend code. The value can be converted to displayable hexadecimal using the D2X built-in REXX function. The value is zero, if no abend has occurred during processing. Data Type: Integer, Read-only
WWW.ABENDREASON | Contents: The decimal value of the last encountered abend reason code. The value can be converted to displayable hexadecimal using the D2X built-in REXX function. The value is zero, if no abend has occurred during processing. Data Type: Integer, Read-only
WWW.ACCEPT_CHARSET | Contents: The value of the Accept-charset: HTTP request header token. If the Accept-charset: request header is not present in the inbound HTTP request, this variable is seto to a NULL value. Data Type: Character, Read-Only
WWW.ACCEPT_ENCODING | Contents: The value of the Accept-encoding: HTTP request header token. If the Accept-encoding: request header is not present in the inbound HTTP request, this variable is seto to a NULL value. Data Type: Character, Read-Only
WWW.ACCEPT_LANGUAGE | Contents: The value of the Accept-language: HTTP request header token. If the Accept-language: request header is not present in the inbound HTTP request, this variable is set to a NULL value. Data Type: Character, Read-Only
WWW.ACCEPT.0 | Contents: Contains the number of Accept: HTTP request headers found within the inbound HTTP request. If none were found, the value of this variable is zero. Data Type: Integer, Read-Only
WWW.ACCEPT.n | Contents: Variables WWW.ACCEPT.1 through WWW.ACCEPT.n (where n is equal to the value of the variable WWW.ACCEPT.0) contain each of the tokens set for the Accept: HTTP request headers found in the inbound HTTP transaction. If no Accept: headers were present in the inbound message, then WWW.ACCEPT.0 will be set to zero, and the remaining WWW.ACCEPT.n variables will not be instantiated. Data Type: Character, Read-Only
WWW.AUTH | Contents: Set to a character value indicating the authorization level of the current event procedure. Possible values are: "NONE". No authorization data is sent with the inbound HTTP transaction request. The current transaction runs under the authorization of the Web Server subsystem or an overriding RUNAUTH userid value. "SENT". The authorization data is sent with the inbound HTTP transaction request; however, it has not been used to perform Userid/Password validation. (In order to conserve CPU resources, Userid validation is only performed when required by the security attributes of the transaction. Because Userid validation was not required by the current transaction, the authorization data sent by the Web client was not processed.) The current transaction runs under the authorization of the Web Server subsystem or an overriding RUNAUTH userid value. "NO". Authorization data is contained within the inbound HTTP transaction request; however, the Userid or password value was invalid and could not be used to log on to the system. The current transaction runs under the authorization of the Web Server subsystem or an overriding RUNAUTH userid value. "YES". The inbound HTTP transaction contains a valid userid and password that was used to log on to the system. The current transaction is running under the authorization of the Web Server subsystem, an overriding RUNAUTH userid value, or the authorization of the end user. Data Type: Character, Read-Only
WWW.AUTHDATA | Contents: Contains the value of the undecoded authentication information sent by inbound HTTP Authorization: request header. If no such request header was present, this variable contains a NULL string. Data Type: Character, Read-Only
WWW.AUTHMETHOD | Contents: Contains the value of the authorization method specified in the inbound HTTP Authorization: request header. If no such request header was present, this variable contains a NULL string. At present, the only allowable value for this variable is the string "Basic". Data Type: Character, Read-Only
WWW.AUTHMSG | Contents: Contains a string value containing the message issued by the security subsystem when the inbound userid and password were used to process a logon request. Data Type: Character, Read-Only
WWW.AUTHORIZATION | Contents: Contains the decoded value of the Authorization: userid and password contained within the inbound HTTP request. If no Authorization: request header was present, this variable contains a NULL string. The password within the decoded authorization string has been overlaid with X's. Data Type: Character, Read-Only
WWW.AUXCOMPONENT | Contents: Invokes external MVS subsystems for some Web Server processes. If an exceptional condition occurs, the WWW.AUXxxxx variables are set to reflect the error. This variable contains the name of the external component. It is set to the string 'DB2' when exceptional conditions are noted during DB2 open processing or when processing an EXECSQL process section. Data Type: Character, Read-Only
WWW.AUXRC | Contents: Invokes external MVS subsystems for some Web Server processes. If an exceptional condition occurs, the WWW.AUXxxxx variables are set to reflect the error. This variable contains the return code set by the external component. Data Type: Integer, Read-Only
WWW.AUXREASON | Contents: Invokes external MVS subsystems for some Web Server processes. If an exceptional condition occurs, the WWW.AUXxxxx variables are set to reflect the error. This variable contains the reason code set by the external component. Data Type: Integer, Read-Only
WWW.AUXABEND | Contents: Invokes external MVS subsystems for some Web Server processes. If an exceptional condition occurs, the WWW.AUXxxxx variables are set to reflect the error. This variable contains the abend code set by the external component. Data Type: Integer, Read-Only
WWW.AUXOTHER | Contents: Invokes external MVS subsystems for some Web Server processes. If an exceptional condition occurs, the WWW.AUXxxxx variables are set to reflect the error. This variable contains any other code set by the external component. Data Type: Integer, Read-Only
WWW.AUXMSG | Contents: Invokes external MVS subsystems for some Web Server processes. If an exceptional condition occurs, the WWW.AUXxxxx variables are set to reflect the error. This variable contains text information describing the exceptional condition. Data Type: Character, Read-Only
WWW.COOKIE | Contents: Contains the value specified for the Cookie: HTTP request header, if present, or a NULL string. See the Netscape Documentation at Persistent Client State HTTP Cookies for more information. Data Type: Character, Read-Only
WWW.COOKIE.xxxxx | Contents: Contains the value of the name/value pair, xxxxx, contained within the Cookie: HTTP request header. See the Netscape Documentation at Persistent Client State HTTP Cookies for more information. Data Type: Character, Read-Only
WWW.CONTENT_LENGTH | Contents: Contains the value specified for the Content-length: HTTP request header, if present, or a NULL string. Data Type: Integer, Read-Only
WWW.CONTENT_TYPE | Contents: Contains the value specified for the Content-type: HTTP request header, if present, or a NULL string. Data Type: Character, Read-Only
WWW.CURRENTURL | Contents: The current value of the URL being used to perform matching to Web event procedures. This is normally set to the value specified in the input HTTP transaction request, unless an intervening procedure or subsystem, has altered the match value. The subsystem alters match values when certain errors are encountered to re-direct processing to one of the built-in SYSTEM/ERROR/nnn procedures. User procedures may alter the match URL value by issuing "RETURN RESCAN xxxx" from an event procedure. Data Type: Character, Read-Only
WWW.DATE | Contents: Contains the value specified for the Date: HTTP request header, if present, or a NULL string. Data Type: Character, Read-Only
WWW.EFFECTIVEUSERID | Contents: Contains the MVS userid under whose authority the Web transaction is currently executing. The value returned when this variable is interrogated reflects the subtask-level security authorization controls (the ACEE control block userid) established immediately before the current transaction procedure was given control. The userid returned can be the default Web transaction RUNAUTH userid, a client userid, or a third-party proxy userid, depending on the security controls in place when this /*WWW rule began execution. Data Type: Character, Read-Only Special Note: When /*ATH rules are executed on behalf of web transaction procedures, WWW. variables are normally made available to the /*ATH rule for inspection. However, WWW.EFFECTIVEUSERID is set to NULL whenever an /*ATH LOGON or LOGOFF procedure is being executed.
WWW.ERRORCODE | Contents: Contains the value of the transaction error code field. The field may be set by the subsystem in response to various transaction-related error events. Data Type: Integer, Read-Only
WWW.FIELD.0 | Contents: Contains the number of field name/value pairs present within the input HTTP transaction. This value is set to zero, if no name/value pairs were present. Data Type: Integer, Read-Only
WWW.FIELD.n.NAME | Contents: Contains the name of the nth field name/value present within the input HTTP transaction. The value of n ranges from 1 to the value set for WWW.FIELD.0. Data Type: Character, Read-Only
WWW.FIELD.n.VALUE | Contents: Contains the value of the nth field name/value present within the input HTTP transaction. The value of n ranges from 1 to the value set for WWW.FIELD.0. If no value was present for the Nth pair, this variable contains a NULL string. Data Type: Character, Read-Only
WWW.FILE.0 | Contents: Contains the number of files returned with the POST operation request. Data Type: Integer, Read-Only If the value is not zero, the following six variables will also be defined: WWW.FILE.N.FILENAME Contents: Contains the name of the file (in mixed case) as it existed on the remote system. Data Type: Character, Read-Only WWW.FILE.N.NAME Contents: Contains the name of the field that requested this file as expressed in the HTML for this page. Data Type: Character, Read-Only WWW.FILE.N.HTTP_CONTENT_LENGTH Contents: Contains the operand of the Content-lenth: header associated with this file. Data Type: Character, Read-Only WWW.FILE.N.HTTP_CONTENT_TYPE Contents: Contains the operand of the Content-type: header associated with this file. Data Type: Character, Read-Only WWW.FILE.N.FLAGS Contents: Flags defining things about this file. Currently, the only flag defined is the low-order bit. 0 = no translations will take place. 1 = data will be translated fro ASCII to EBCDIC before presented to the user. Data Type: Integer, Read-Only WWW.FILE.N.TOEBCDIC Contents: The four character name of the translation table to be used. Data Type: Character, Read-Only
WWW.FORWARDED | Contents: Contains the value specified for the Forwarded: HTTP request header, if present, or a NULL string. Data Type: Character, Read-Only
WWW.FROM | Contents: Contains the value specified for the From: HTTP request header, if present, or a NULL string. Data Type: Character, Read-Only
WWW.IF_MODIFIED_SINCE | Contents: Contains the value specified for the If-modified-since: HTTP request header, if present, or a NULL string. Data Type: Character, Read-Only
WWW.INPUTURL | Contents: Contains the original inbound HTTP request URL value. Data Type: Character, Read-Only
WWW.LINE.0 | Contents: Contains the number of individual lines within the inbound HTTP request header. Each line is delimited by a CRLF combination. Data Type: Integer, Read-Only
WWW.LINE.n | Contents: Contains the contents of the Nth line of the inbound HTTP request header. Each line is delimited by a CRLF combination. The line data does not contain the delimiting CRLF. The number of WWW.LINE.n variables is given by WWW.LINE.0. Data Type: Character, Read-Only
WWW.MATCHVALUE | Contents: Contains the criterion value of the current WWW event procedure to which the inbound URL has been matched. Data Type: Character, Read-Only
WWW.MESSAGE_ID | Contents: Contains the value specified for the Message-id: HTTP request header, if present, or a NULL string. Data Type: Character, Read-Only
WWW.METHOD | Contents: Contains the value specified for the HTTP method specified in the inbound transaction. The Shadow OS/390 Web Server accepts transactions which specify the "GET", "POST", and "HEAD" methods. Data Type: Character, Read-Only
WWW.MIME_VERSION | Contents: Contains the value specified for the MIME-version: HTTP request header, if present, or a NULL string. Data Type: Character, Read-Only
WWW.PASSWORD | Contents: Contains a NULL string if no authentication data was transmitted by the client. Otherwise it points to a string containing the password supplied as part of the BASIC authentication method. The password string is overlaid with X's unless the server start-up parameter EXPOSEWWWPASSWORD start-up option is set to YES. Note that the default value for this start-up option is NO, so the client password is normally not actually available using this variable. Data Type: Character, Read-Only
WWW.PRAGMA | Contents: Contains the value specified for the Pragma: HTTP request header, if present, or a NULL string. Data Type: Character, Read-Only
WWW.PROTOCOL | Contents: Contains the value HTTP version value which was present within the inbound HTTP request header. Data Type: Character, Read-Only
WWW.QUERY | Contents: Contains the value of any encoded query data which was present within the inbound HTTP request header. Data Type: Character, Read-Only
WWW.REFERER | Contents: Contains the value specified for the Referer: HTTP request header, if present, or a NULL string. Data Type: Character, Read-Only
WWW.SSL | Contents: Set to upper-case "Y" if an SSL connection is in use between the Server and client. Set to upper-case "N", if an SSL connection is not in use. Data Type: Character, Read-Only
WWW.STATUSCODE | Contents: Contains the value set by a previous procedure, of the subsytem itself for the HTTP response status code value. If set to zero, the subsystem substitutes value 200 (request was fulfilled). The only action of this variable is to save the status code placed into transaction-level SMF records. Data Type: Integer, Read-Write
WWW.TEXT | Contents: Contains the entire HTTP request header. Data Type: Character, Read-Only
WWW.USER_AGENT | Contents: Contains the value specified for the User-agent: HTTP request header, if present, or a NULL string. Data Type: Character, Read-Only
WWW.USERID | Contents: Contains the userid, if any, present within the inbound Authorization: request header. Data Type: Character, Read-Only
WWW.VAR.xxxxx | Contents: Contains, for each inbound query variable named xxxxx, the value input for the variable. If multiple query variables of the same name are input, the variable will contain the value set only for the last of these. Data Type: Character, Read-Only
Top