Previous Topic
Table Of Contents
Parent Topic
Next Topic

The SWSINFO Function

Related Topics

Web Server API Function Index


May be used in Shadow/REXX
May be used from Other REXX Interpreters
High-level language interface is available

SWSINFO is a built-in function used to retrieve environmental information from the Shadow OS/390 Web Server Subsystem.

SWSINFO Syntax

The SWSINFO function takes one argument.

The invocation format for SWSINFO is:


  var = SWSINFO( arg1 )

The input argument may be one of the following string constants:

Argument Value Returned
ASID Return the ASID as a 2-byte binary value, when invoked via the program API. The ASID is returned as a 4-byte value when invoked from REXX.
BYTES Return the number of saved bytes
CLOCK Return the current TOD clock value as an 8-byte binary TOD format. Note that this is the unadjusted STCK value.
CONNECTID Return the unique CONNECTION ID value
CPUDELTA Return the 8-byte task CPU time delta value
CPUTIME Return the 8-byte task CPU time value in TOD format. Divide by 4096 to get microseconds.
DB2PLAN Return the DB2 plan name
DB2SUBSYS Return the DB2 subsystem name
EVENTTYPE Return an indication of the event type associated with the invocation of the rule/program.
HOSTDOMAIN Return the host (server) domain associated with the current request.
HOSTNAME Return the HOSTNAME (CLIENT) associated with the current request.
HTTPDOMAIN Return a string containing the full server domain name, including the 'http://' prefix string, and TCP/IP port number. The port number is omitted if set to the standard HTTP port (80).
HTTPSDOMAIN Return a string containing the full server domain name, including the 'https://' prefix string, and TCP/IP port number. The string returned can be used to construct HTML HREF tags which utilize an SSL connection. The port number is omitted in the string if set to the standard SSL HTTPS port (443).

A NULL string is returned if the server is not configured to support SSL connections.

IPADDRESS Return the IP Address for the current request. The function returns a 4-byte binary value, when invoked via the program API. A formatted character value in the form, 10.123.2.12 is returned when this function is invoked from REXX.
JOBNAME Return the MVS job name related to the current primary address space
LASTCONNECTID Return the last CONNECTION ID used on the current link
LASTUSERID Returns the last Userid used on the current link
LINKTYPE Return the link type for the current request
LU Return the LU NAME for the current request
MAINPGM Return the name of the main REXX program or rule
MODE Return the mode name for the current request
ODBCDATE Return the compile date of the ODBC driver
ODBCVERSION Return the ODBC driver version
PRODUCT Return the Product Identification string
PRODUCTSTATUS Returns the current product status
PROGRAM Return the name of the REXX program or rule
ROWS Return the number of source rows
SEFFEATURE Returns a single blank if SEF is not enabled.
SUBSYS Return the accessed subsystem ID from the current OPMS image
SUBSYSASID Return the ASID of the active subsystem from the real OPMS as a 2-byte binary value when invoked via the program API and as a 4-byte value when invoked from REXX.
SMFID Return the SMFID
TASKTYPE Return the task type
TRANSTYPE Return the transaction program type
USERID Return the Userid value
USERPARM Return the user parameter string from the client
VERSION Return the version string of the product subsystem under which this rule/program is running

Return Values

The function always returns the indicated value. If the value requested is not valid for the environment, a NULL string is returned.

Examples

The following request will set the REXX variable, IPA, to the 4-byte binary TCP/IP address of the Web Client program:


     IPA = SWSINFO('IPADDRESS')

Top