$Web Off: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
(No difference)

Revision as of 20:26, 26 October 2012

<section begin="desc" />Suspend adding terminal output to response<section end="desc" />


$Web_Off suspends adding terminal output to the client buffer.

$Web_Off takes no arguments and returns a status code.

Syntax

<section begin="syntax" />%rc = $Web_Off <section end="syntax" />

Return codes

Code Meaning
0 Completed successfully.
-1 Not a web thread

Usage notes

  • $Web_Off may be invoked using the keyword CALL instead of assigning it to a %variable. For more information, see "Calling Sirius Mods $functions".
  • Web-connected clients have their terminal output routed either to the buffer that will be sent to them at the end of the connection, or to the Model 204 audit trail. During execution of a JANUS WEB ON ... CMD action, PRINT statements, command output, and error messages are normally translated from EBCDIC to ASCII and added to the client buffer.
  • $Web_Off is called to selectively prevent terminal output from being added to the client buffer. During initial processing for Janus Web Server, the state is $WEB_OFF, preventing output from OPEN FILE, OPEN GROUP, or CMD commands on the JANUS DEFINE command from being routed to the client buffer. If the selected JANUS WEB ON rule specifies a CMD sub-command, the state is changed to $WEB_ON, which allows terminal output from commands and PRINT statements to display at the browser.

Examples

This example shows terminal output for an OPEN FILE command being redirected to the audit trail by the preceding $WEB_OFF, then output being redirected to the client buffer again in the request continuation with a $Web_On:

B %X = $Web_Off END OPEN FILE WORK ******* B %X = $Web_On

See also