|
The SWSSEND FunctionRelated Topics
SWSSEND is a built-in function used to transmit outbound data to Web server clients from REXX-Language event procedures. SWSSEND may only be used from within WWW event procedures and will return an error if invoked from other event procedure types.
SWSSEND SyntaxThe SWSSEND function takes one or two arguments. The invocation format for SWSSEND is: z = SWSSEND( arg1 {, arg2 } ) The first argument always specifies the data to be be transmitted to the Web server client. A NULL string should be passed as the first argument for PURGE or FLUSH requests. The second argument may be one of the following string constants:
Return ValuesSWSSEND always returns a numeric value. If the value is zero the operation has completed successfully. A non-zero return value indicates that the communications session has been lost. The SWSSEND operation is not logged to the Server's wrap-around trace file unless an error occurs. If you need to trace information sent using SWSSEND, use the SENDTRACE keyword of the /*WWW rule header.
ExamplesThe following call will buffer the HTML data for outbound transmission. A linefeed character will be added following the data and the data will be translated to ASCII before transmission: htmldata = "<h1>This is a Header</h1>" z=SWSSEND( htmldata ) The following call will place the data into the outbound buffer with no additional processing: z=SWSSEND( gifdata , "BINARY" ) The following call will cause all buffered data to be sent to the client immediately. z=SWSSEND( , "FLUSH" ) The following call will purge all previously buffered data. Data which was flushed prior to this call, will have already been sent to the Web client. z=SWSSEND( , "PURGE" ) |