Previous Topic Table Of Contents Parent Topic Next Topic |  | # SWSPARM Function Related Topics Web Server API Function Index
| May be used in Shadow/REXX
| May not be used from Other REXX Interpreters
| No high-level language interface
You use the SWSPARM function of Shadow/REXX to set or display the values of Shadow OS/390 Web Server product parameters. ## SWSPARM Syntax The SWSPARM function has this format: To display parameters, use this format: `var = SWSPARM("SHOW", parmname, "INFO", "NAMES")` To set parameters, use this format: `var = SWSPARM("SET", parmname, newvalue )` The first two arguments are required parameters. Other arguments are optional. parmname The parmname argument specifies the name of the product parameter (for example, "TRACEHTML") to be displayed or set. This name can contain no more than 50 characters. For the Show function, this argument may be coded as 'GROUPS' to have a list of product parameters returned to the external data queue. You may also code a product parameter group name (such as 'PRODWWW' to display a list of the individual parameters defined within the group. newvalue The value specifies the new value you are assigning to a parameter when you use the Set function. This argument is required for Set requests. INFO Use the INFO argument with the Show function to display the possible values the parameter can have. NAMES Use the NAMES argument with the Show function to display the names and modifiability indicators of individual parameters. Note that the 'INFO' and 'NAMES' parameters must be coded on the function call as parameters 3 and 4, respectively. Use commas to indicate any omitted arguments which precede these two values. ## Return Values For all Show functions, SWSPARM returns the results on the REXX external data queue. The external data queue is not used for Set function requests. You can retrieve the result lines from the external data queue using code such as:
         DO WHILE QUEUED() > 0
            PARSE PULL QLINE
            ....perform some process against each line
         END
In addition, the SWSPARM function always returns one of these codes:
Return Code | Meaning
--- | ---
0 | The SWSPARM function completed successfully.
4 | Authorization check failed.
16 | The Web Server Subsystem is not active.
20 | The parameter new value is not valid.
48 | The parameter name specified is not valid.
52 | Some type of abend occurred while processing your request.
Top ## Examples You can see this function code in action by referring to the supplied sample PARMS Web Transaction. ### Example 1 To display the address of a module, invoke the SWSPARM function as follows:
        RetCode = SWSPARM("SHOW","OPWWWWPR")
        Say "SWSPARM() return code is:" RetCode
        Do While Queued()  0
          Pull Data
        Say Data
        End
In response, the following information is displayed:
        SWSPARM() return code is:     0
        ADDRESS OF MODULE OPWWWWPR X'06E1B000'
### Example 2 To display the current value of an individual parameter:
        RetCode = SWSPARM("SHOW","TRACEHTML")
        Say "SWSPARM() return code is:" RetCode
        Do While Queued()  0
          Pull Data
        Say Data
        End
In response, the following information is displayed:
        SWSPARM() return code is:     0
        WEB TRANSACTION OUTPUT TRACE DEFAULT NO
### Example 3 To display the current value of an individual parameter, along with additional information:
        RetCode = SWSPARM("SHOW","TRACEHTML","INFO,"NAMES")
        Say "SWSPARM() return code is:" RetCode
        Do While Queued()  0
          Pull Data
        Say Data
        End
In response, the following information is displayed:
        SWSPARM() return code is:     0
        WEB TRANSACTION OUTPUT TRACE DEFAULT           NO
        TRACEHTML                                      Y PRODWWW
        FIELD FORMAT                                   BD
        FIELD LENGTH                                   013
        FIELD GROUP                                    016
        FIELD SUFFIX                                   *
        WEB TRANSACTION OUTPUT TRACE DEFAULT FLAG OFF  NO
        WEB TRANSACTION OUTPUT TRACE DEFAULT FLAG ON   YES
### Example 4 To display the address of a module with information and name, invoke SWSPARM as follows:
        RetCode = SWSPARM("SHOW","OPWWWWPR","INFO","NAMES")
        do while QUEUED() > 0
          pull data
          say data
        end
In response, the following information is displayed:
        ADDRESS OF MODULE OPWWWWPR        X'06E1B000'
        OPITQWFU                          N PRODMODULES
        FIELD FORMAT                      ND
        FIELD LENGTH                      004
        FIELD GROUP                       015
        FIELD SUFFIX                      *
        MODULE ORIGINAL ADDRESS           X'06E1B000'
        MODULE FINAL ADDRESS              X'06E1B000'
        MODULE VECTOR TABLE ENTRY ADDRESS X'06F20390'
        MODULE SIZE                       14160 BYTES
        MODULE PROTECT KEY                CODE (2)
        MODULE VERSION                    02.01.00
        MODULE PROGRAMMER NAME            AI38LRM
        MODULE ASSEMBLY DATE              04/08/96
        MODULE ASSEMBLY TIME              10.04
        MODULE IS ELIGIBLE FOR RELOAD     YES
Top