$Web Set: Difference between revisions
m (1 revision) |
mNo edit summary |
||
Line 17: | Line 17: | ||
</table> | </table> | ||
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 <var>$ | 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 <var>$Web_Set</var>, as in the following: | ||
<p class="code"> %RC = $Web_Set(, 'NOAUTODONE') | <p class="code"> %RC = $Web_Set(, 'NOAUTODONE') | ||
Line 32: | Line 32: | ||
Parameters that can be changed with <var>$Web_Set</var> are: | Parameters that can be changed with <var>$Web_Set</var> are: | ||
<table | <table> | ||
<tr><th>AUTODONE, NOAUTODONE</th> | <tr><th>AUTODONE, NOAUTODONE</th> | ||
<td>Changes the AUTODONE setting for the current thread.</td></tr> | <td>Changes the <var>[[AUTODONE (JANUS DEFINE parameter)|AUTODONE]]</var> setting for the current thread.</td></tr> | ||
<tr><th>CLOSEIMMED, NOCLOSEIMMED</th> | |||
<td>Indicates whether the Janus PST should not BUMP the <var class="product">Model 204</var> 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 for more information.</td></tr> | <tr><th nowrap>CLOSEIMMED, NOCLOSEIMMED</th> | ||
<td>Indicates whether the Janus PST should not BUMP the <var class="product">Model 204</var> 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 <var>[[CLOSEIMMED (JANUS DEFINE parameter)|CLOSEIMMED]]</var> for more information.</td></tr> | |||
<tr><th>CLOSEREAD, NOCLOSEREAD</th> | <tr><th>CLOSEREAD, NOCLOSEREAD</th> | ||
<td>Indicates whether a thread should keep a TCP read active in order to immediately detect when the client closes the web connection. See for more information.</td></tr> | <td>Indicates whether a thread should keep a TCP read active in order to immediately detect when the client closes the web connection. See <var>[[CLOSEREAD (JANUS DEFINE parameter)|CLOSEREAD]]</var> for more information.</td></tr> | ||
<tr><th>COMPRESS</th> | <tr><th>COMPRESS</th> | ||
<td>Overrides the compression level set in the JANUS DEFINE command or the JANUS WEB ON rule. See for more information.</td></tr> | <td>Overrides the compression level set in the JANUS DEFINE command or the JANUS WEB ON rule. See <var>[[COMPRESS (JANUS DEFINE parameter)|COMPRESS]]</var> for more information.</td></tr> | ||
<tr><th>CR, LF, CRLF</th> | <tr><th>CR, LF, CRLF</th> | ||
<td>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 | <td>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 <var>[[$Web_Proc_Receive]]</var> for more information. | ||
<p class="code"> | <p> | ||
The following examples all set the end of line character string to ASCII carriage return and line feed (X'0D0A') characters:</p> | |||
<p class="code">%RESULT = $Web_Set('CR','CRLF') | |||
%RESULT = $Web_Set(,'CRLF') | |||
%RESULT = $Web_Set('LF','CRLF')</p></td></tr> | |||
<tr><th>MAXTEMP</th> | <tr><th>MAXTEMP</th> | ||
<td>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 <var class="product">[[Janus Web Server]]</var> request, a soft restart occurs. See for more information.</td></tr> | <td>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 <var class="product">[[Janus Web Server]]</var> request, a soft restart occurs. See <var>[[MAXTEMP (JANUS DEFINE parameter)|MAXTEMP]]</var> for more information.</td></tr> | ||
<tr><th>OUTEOL</th> | <tr><th>OUTEOL</th> | ||
<td>Change the end-of-line character string for <var class="product"> | <td>Change the end-of-line character string for <var class="product">Janus Web Server</var> output lines. The previous setting of OUTEOL is returned if the function is successful. Valid options are: | ||
<table | <table> | ||
<tr><th>CR</th> | <tr><th>CR</th> | ||
<td>Indicates that lines of text data should be separated by the ASCII carriage return (X'0D') character.</td></tr> | <td>Indicates that lines of text data should be separated by the ASCII carriage return (X'0D') character.</td></tr> | ||
<tr><th>CRLF</th> | <tr><th>CRLF</th> | ||
<td>Indicates that lines of text data should be separated by the ASCII carriage return and line feed (X'0D0A') characters.</td></tr> | <td>Indicates that lines of text data should be separated by the ASCII carriage return and line feed (X'0D0A') characters.</td></tr> | ||
<tr><th>LF</th> | <tr><th>LF</th> | ||
<td>Indicates that lines of text data should be separated by the ASCII line feed (X'0D') character. | <td>Indicates that lines of text data should be separated by the ASCII line feed (X'0D') character. | ||
</td></tr></table> | </td></tr></table> | ||
<tr><th>XTAB</th> | <tr><th>XTAB</th> | ||
<td>Change the translate table used for translating input and output text streams. For <var class="product"> | <td>Change the translate 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. 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 <var>[[XTAB (JANUS DEFINE parameter)|XTAB]]</var> for more information. | ||
</td></tr> | </td></tr> | ||
</table> | </table> | ||
[[Category:Janus Web Server $functions|$Web_Set]] | [[Category:Janus Web Server $functions|$Web_Set]] |
Revision as of 21:25, 26 October 2012
<section begin="desc" />Change certain web connection settings<section end="desc" />
$Web_Set allows programmers to change some web connection settings.
Syntax
<section begin="syntax" />%rc = $Web_Set( parameter, value ) <section end="syntax" />
$Web_Set takes two arguments, and it returns the previous value of the parameter if the setting was changed, or it returns 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. |
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:
| ||||||
XTAB | Change the translate 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. |