Previous Topic
Table Of Contents
Parent Topic

The SWSXMIT 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
See also SWSSEND Host Command Environment

SWSXMIT is a built-in function used to transmit outbound data to Web server clients from REXX-Language event procedures. SWSXMIT may only be used from within WWW event procedures and will return an error if invoked from other event procedure types.

This function is deprecated although it will continue to be supported for the foreseeable future. NEON Systems recommends you use the SWSSEND built-in function.

SWSXMIT Syntax

The SWSXMIT function takes from one to four arguments. The first argument is always required. All other arguments are optional.

The invocation format for SWSXMIT is:

z = SWSXMIT( arg1 {, arg2 {, arg3 {, arg4 }}} )

The first argument always specifies the data to be be transmitted to the Web server client. A NULL string may be passed as the first argument, or the argument may be omitted entirely by coding a single comma in its place.

The second through fourth arguments are selected from the following string constants:

  • LF - Indicates that a Linefeed character should be appended to the data. This operand may also be coded as the constant CRLF.
  • ASCII - Indicates that the data should be translated from EBCDIC to ASCII before transmission.
  • FLUSH - Indicates that this data (and any data already in the outbound buffers) should be written to the client immediately.
  • PURGE - Indicates that all data currently untransmitted within buffers should be discarded.

The PURGE operand must not be coded in conjunction with any other arguments.

Return Values

The function returns a zero to the calling program if the function completed successfully. A non-zero value indicates that the outbound communications session has failed.

Examples

The 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=SWSXMIT( htmldata, 'LF', 'ASCII' )

The following call will place the data into the outbound buffer with no additional processing:

z=SWSXMIT( gifdata )

The following call will buffer the HTML data for outbound transmission. It will then cause all buffered data to be sent to the client immediately.

htmldata = "<h1>This is a Header</h1>"

z=SWSXMIT( htmldata, 'ASCII', 'LF', '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=SWSXMIT( , 'PURGE' )


Top