$Web Set: Difference between revisions
(Automatically generated page update) |
m (add links) |
||
(One intermediate revision by one other user not shown) | |||
Line 9: | Line 9: | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table | <table> | ||
<tr><th>%rc</th> | <tr><th>%rc</th> | ||
<td>Receives the previous value of the parameter if the setting was changed, or it receives a null string if any error occurred. | <td>Receives the previous value of the parameter if the setting was changed, or it receives a null string if any error occurred. | ||
Line 36: | Line 36: | ||
<li>Parameters that can be changed with <var>$Web_Set</var> are: | <li>Parameters that can be changed with <var>$Web_Set</var> are: | ||
<table> | <table class="thJustBold"> | ||
<tr><th>AUTODONE, NOAUTODONE</th> | <tr><th>AUTODONE, NOAUTODONE</th> | ||
<td>Changes the <var>[[AUTODONE (JANUS DEFINE parameter)|AUTODONE]]</var> setting for the current thread.</td></tr> | <td>Changes the <var>[[AUTODONE (JANUS DEFINE parameter)|AUTODONE]]</var> setting for the current thread.</td></tr> | ||
Line 69: | Line 69: | ||
<tr><th>LF</th> | <tr><th>LF</th> | ||
<td>Indicates that lines of text data should be separated by the ASCII line feed (X' | <td>Indicates that lines of text data should be separated by the ASCII line feed (X'0A') character. | ||
</td></tr></table> | </td></tr></table> | ||
<tr><th>XTAB</th> | <tr><th>XTAB</th> | ||
<td>Change the | <td>Change the [[Translate tables|translation table]] used for translating input and output text streams. For <var class="product">Janus Web Server</var> 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. | ||
</td></tr> | <p> | ||
The new translate table must already have been loaded with the <var>[[JANUS LOADXT|JANUS LOADXT]]</var> command. </p> | |||
<p> | |||
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 <var>[[XTAB (JANUS DEFINE parameter)|XTAB]]</var> for more information. </p></td></tr> | |||
</table> | </table> | ||
</ul> | </ul> | ||
[[Category:Janus Web Server $functions|$Web_Set]] | [[Category:Janus Web Server $functions|$Web_Set]] |
Latest revision as of 17:29, 12 January 2018
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.