Previous Topic
Table Of Contents
Parent Topic
Next Topic

SWSVALUE Function For Other REXX interpreters

Related Topics

Web Server API Function Index


May be used in Shadow/REXX (see SWSVALUE Function for Shadow/REXX)
May be used from Other REXX Interpreters
High-level language interface available

Using this function, you can manipulate Shadow OS/390 Web Server Global Variables, WWW. Event-related Variables, and GLVEVENT. Temporary Variables from other (non-Shadow/REXX) REXX interpreters.

This page describes the SWSVALUE function, as implemented for use by other REXX interpreters (See Invoking Other REXX interpreters for additional information).

The SWSVALUE interface described here, allows other REXX-language interpreters to access and update Web Server variable information which would otherwise be outside the realm of the REXX interpreter's run-time variable pool.

It does not describe the interface, as implemented for Shadow/REXX. Consult the page SWSVALUE Function for Shadow/REXX for information on how to use this function from Shadow/REXX procedures.

SWSVALUE Syntax

The SWSVALUE function has this format:

var = SWSVALUE(variablename, actioncode, newval)

The arguments to the function are specified as follows:

variablename
This argument gives the name of the symbol to be acted on. When you use this argument without quotation marks, simple symbols following the stem are replaced by their values by the REXX interpreter before being passed to the SWSVALUE function. Note that this action occurs before the SWSVALUE function API is actually invoked. The resulting string is limited to a maximum of 50 bytes in length. Trailing blanks, if any, are striped from the variable name during evaluation by the SWSVALUE API.

You may specify the name of a Global Variable or GLVEVENT. Temporary Variable upon which the function is to act.

You may also specify the name of a WWW Event-Related variable, but only when invoking this function to read a variable value. You may not set the value of a WWW Event-Related variable.

actioncode
Specifies the action to be taken on the symbol. The table below indicates what actions are taken.
newval
Supplies the new value (if any) to assign to the symbol. The maximum size data value, which can be assigned to any Server-managed variable, is limited to 32,000 bytes. If the size of the new value exceeds 32,000 bytes, the SWSVALUE will be terminated with an evaluation error (such as, "IRX0040I Incorrect call to routine").

Return Values

SWSVALUE returns the value of the variablename from the function call.

The Chart below shows what actions are performed for each of the action codes values, and what values are returned.

Action Code Description
O (Obtain) Obtains the value of the requested variable. If the variable does not exist, the function returns an interpretation error.

This function may be used to act upon Global Variables, GLVEVENT. Variables and WWW. Event-Related Variables.

Syntax Example:

val = SWSVALUE(variablename,'O')

U (Update) Assigns newvalue as the value of the symbol specified by variablename. If the symbol does not exist, it is created by the function.

The variablename argument must specify the name of a Global or GLVEVENT. variable. This call cannot be used to set the value of a WWW. variable.

Returns the variable specified by newvalue.

Syntax Example:

val = SWSVALUE(variablename,'U',newval)

V (Value) Returns the current value of the symbol specified by variablename. If the node does not exist, the function creates it but assigns it no value (giving the symbol the same value as its name).

Returns the value of the specified compound symbol

This function may be used to act upon Global Variables, GLVEVENT. Variables and WWW. Event-Related Variables.

Syntax Example:

val = SWSVALUE(variablename,'V')

 


Top