$Web_Set

From m204wiki
Revision as of 17:29, 12 January 2018 by JAL (talk | contribs) (add links)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Change certain web connection settings

$Web_Set allows programmers to change some web connection settings.

Syntax

%rc = $Web_Set( parameter, value )

Syntax terms

%rc Receives the previous value of the parameter if the setting was changed, or it receives a null string if any error occurred.
parameter A string indicating the name of the parameter.
value A string containing the new value of the parameter.

Usage notes

  • Self-defining parameters, that is, parameters that aren't followed by a value, can be changed simply by specifying the new value as the second argument to $Web_Set, as in the following:

    %rc = $Web_Set(, 'NOAUTODONE')

    The value of such a self-defining parameter can be retrieved by specifying any of the mutually exclusive values of such a parameter. For example, all the following are equivalent:

    %LINEND = $Web_Set('CR') %LINEND = $Web_Set('LF') %LINEND = $Web_Set('CRLF')

  • Parameters that can be changed with $Web_Set are:
    AUTODONE, NOAUTODONE Changes the AUTODONE setting for the current thread.
    CLOSEIMMED, NOCLOSEIMMED Indicates whether the Janus PST should not BUMP the Model 204 thread if the connection is lost. A lost connection will be reported the next time the application writes to the socket or calls a $Web function. See CLOSEIMMED for more information.
    CLOSEREAD, NOCLOSEREAD Indicates whether a thread should keep a TCP read active in order to immediately detect when the client closes the web connection. See CLOSEREAD for more information.
    COMPRESS Overrides the compression level set in the JANUS DEFINE command or the JANUS WEB ON rule. See COMPRESS for more information.
    CR, LF, CRLF Changes the end-of-line character string to the value specified. You can specify CR, LF, or CRLF as the parameter or the value. You may also omit the parameter and simply specify the new value. If you specify the parameter without a value, the current setting is returned. The current setting is also returned when the value is changed. See $Web_Proc_Receive for more information.

    The following examples all set the end of line character string to ASCII carriage return and line feed (X'0D0A') characters:

    %RESULT = $Web_Set('CR','CRLF') %RESULT = $Web_Set(,'CRLF') %RESULT = $Web_Set('LF','CRLF')

    MAXTEMP Change the setting for maximum CCATEMP usage. Valid values are 1 through 65535. If the new setting is lower than the number of pages already used by the Janus Web Server request, a soft restart occurs. See MAXTEMP for more information.
    OUTEOL Change the end-of-line character string for Janus Web Server output lines. The previous setting of OUTEOL is returned if the function is successful. Valid options are:
    CR Indicates that lines of text data should be separated by the ASCII carriage return (X'0D') character.
    CRLF Indicates that lines of text data should be separated by the ASCII carriage return and line feed (X'0D0A') characters.
    LF Indicates that lines of text data should be separated by the ASCII line feed (X'0A') character.
    XTAB Change the translation table used for translating input and output text streams. For Janus Web Server connections, this generally will apply only to the output stream. If this setting is changed after part of the output stream has been generated, it is indeterminate where in the output stream the new translation will take effect.

    The new translate table must already have been loaded with the JANUS LOADXT command.

    If the function is successful, the old translate table name is returned. Otherwise, a null string is returned, and the translate table is not changed. See XTAB for more information.