$Web Set: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 2: Line 2:
<span class="pageSubtitle"><section begin="desc" />Change certain web connection settings<section end="desc" /></span>
<span class="pageSubtitle"><section begin="desc" />Change certain web connection settings<section end="desc" /></span>


$Web_Set allows programmers to change some web connection settings.


$Web_Set allows programmers to change some web connection settings.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RC = $Web_Set( parameter, value )
<p class="syntax"><section begin="syntax" /> %RC = $Web_Set( parameter, value )
<section end="syntax" /></p>
<section end="syntax" /></p>


$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.
$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.
Line 16: Line 14:
<tr><th>value</th>
<tr><th>value</th>
<td>A string containing the new value of the parameter.
<td>A string containing the new value of the parameter.
</td></tr></table>
</td></tr>
</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 $WEB_SET, as in the following:


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:
<p class="code"> %RC = $Web_Set(, 'NOAUTODONE')
<p class="code"> %RC = $Web_Set(, 'NOAUTODONE')
</p>
</p>
The value of such a self-defining parameter can be retrieved by specifying any of the mutually exclusive values of such a parameter.
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:
For example, all the following are equivalent:
<p class="code"> %LINEND = $Web_Set('CR')
<p class="code"> %LINEND = $Web_Set('CR')
  %LINEND = $Web_Set('LF')
  %LINEND = $Web_Set('LF')
Line 30: Line 30:
</p>
</p>


Parameters that can be changed with $Web_Set are:


Parameters that can be changed with $Web_Set are:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>AUTODONE, NOAUTODONE</th>
<tr><th>AUTODONE, NOAUTODONE</th>
Line 42: Line 42:
<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 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.
 
<p class="code">  %RESULT = $Web_Set('CR','CRLF') %RESULT = $Web_Set(,'CRLF') %RESULT = $Web_Set('LF','CRLF')</p></td></tr>
 
 
<p class="code"> </p>
<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. %RESULT = $Web_Set('CR','CRLF') %RESULT = $Web_Set(,'CRLF') %RESULT = $Web_Set('LF','CRLF')</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 ''[[Janus Web Server]]'' 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 ''[[Janus Web Server]]'' request, a soft restart occurs. See for more information.</td></tr>
<tr><th>OUTEOL</th>
<tr><th>OUTEOL</th>
 
<td>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:
<table class="syntaxTable">
<table class="syntaxTable">
<td>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:</td></tr>
<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>
Line 62: Line 57:
</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 ''[[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 for more information.
<td>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 for more information.
</td></tr></table>
</td></tr>
 
</table>


[[Category:Janus Web Server $functions|$Web_Set]]
[[Category:Janus Web Server $functions|$Web_Set]]

Revision as of 15:36, 23 February 2011

<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 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 for more information.
COMPRESS Overrides the compression level set in the JANUS DEFINE command or the JANUS WEB ON rule. See 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 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'0D') character.
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 for more information.