SRSPARM parameter: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 6: Line 6:
<dd>User
<dd>User
<dt>Where set
<dt>Where set
<dd>User and $RESETN resettable
<dd>User and <var>$Resetn</var> resettable
<dt>Related products
<dt>Related products
<dd>All
<dd>All
<dt>Introduced
<dt>Introduced
<dd>Before [[Sirius Mods]] 6.7
<dd>Before <var class=product">Sirius Mods</var> 6.7
</dl>
</dl>
==Description==
==Description==
This bitmask parameter makes it possible to change the default behavior
This bitmask parameter makes it possible to change the default behavior of the
of the [[$Web_Restore_Recset]] and [[$Web_Restore_List]] functions.
<var>[[$Web_Save_Recset]]</var> and <var>[[$Web_Save_List]]</var> functions as well as
By default, they act as if MOVE were specified.
the <var>[[$Web_Restore_Recset]]</var> and <var>[[$Web_Restore_List]]</var> functions.
By default, these $Web_Save functions act as if the <code>STEAL</code>, <code>USTEAL</code> and <code>MOVE</code> options were specified;
these $Web_Restore functions act as if <code>MOVE</code> were specified.
The default behavior of all of these functions can, however, be changed on
The default behavior of all of these functions can, however, be changed on
a thread basis by setting the SRSPARM parameter (which can be reset
a thread basis by setting the <var>SRSPARM</var> parameter (which can be reset
with $RESETN).
with <var>[[$Resetn]]</var>).
 
SRSPARM is a bitmask user parameter where the bits mean:
<var>SRSPARM</var> is a bitmask user parameter where the bits mean:
<dl>
<table>
<dt>X'01'
<tr><th>X'01'
<dd>Make &ldquo;ERROR&rdquo; the default for $WEB_SAVE_RECSET and $WEB_SAVE_LIST.
</th><td>Make <code>ERROR</code> the default for <var>$Web_Save_Recset</var> and <var>$Web_Save_List</var>.
<dt>X'02'
</td></tr>
<dd>Make &ldquo;CANCEL&rdquo; the default for $WEB_SAVE_RECSET and $WEB_SAVE_LIST.
<tr><th>X'02'
If this bit is set, the X'01' bit is irrelevant.
</th><td>Make <code>CANCEL</code> the default for <var>$Web_Save_Recset</var> and <var>$Web_Save_List</var>. If this bit is set, the X'01' bit is irrelevant.
<dt>X'04'
</td></tr>
<dd>Make &ldquo;UERROR&rdquo; the default for $WEB_SAVE_RECSET and $WEB_SAVE_LIST.
<tr><th>X'04'
<dt>X'08'
</th><td>Make <code>UERROR</code> the default for <var>$Web_Save_Recset</var> and <var>$Web_Save_List</var>.
<dd>Make &ldquo;UCANCEL&rdquo; the default for $WEB_SAVE_RECSET and $WEB_SAVE_LIST.
</td></tr>
If this bit is set, the X'04' bit is irrelevant.
<tr><th>X'08'
<dt>X'10'
</th><td>Make <code>UCANCEL</code> the default for <var>$Web_Save_Recset</var> and <var>$Web_Save_List</var>. If this bit is set, the X'04' bit is irrelevant.
<dd>Make &ldquo;COPY&rdquo; the default for $WEB_SAVE_RECSET and $WEB_SAVE_LIST.
</td></tr>
<dt>X'20'
<tr><th>X'10'
<dd>CANCEL request on a COPY style $WEB_SAVE_RECSET for an exclusively locked record set.
</th><td>Make <code>COPY</code> the default for <var>$Web_Save_Recset</var> and <var>$Web_Save_List</var>.
If this bit is not set, this error would simply be reflected with an error code of 7.
</td></tr>
This operation is not allowed, because there cannot be two threads that
<tr><th>X'20'
have the same records locked in exclusive mode, which is what would be
</th><td><var>CANCEL</var> request on a <var>COPY</var> style <var>$Web_Save_Recset</var> for an exclusively locked record set. If this bit is not set, this error would simply be reflected with an error code of 7.
the case after a COPY type save of an exclusively locked record set.
This operation is not allowed, because there cannot be two threads that have the same records locked in exclusive mode, which is what would be the case after a <var>COPY</var> type save of an exclusively locked record set.
<dt>X'40'
</td></tr>
<dd>Make &ldquo;COPY&rdquo; the default for $WEB_REST_RECSET and $WEB_REST_LIST.
<tr><th>X'40'
<dt>X'80'
</th><td>Make <code>COPY</code> the default for <var>$Web_Rest_Recset</var> and <var>$Web_Rest_List</var>.
<dd>CANCEL request on a COPY style $WEB_REST_RECSET for an exclusively locked record set.
</td></tr>
If this bit is not set, this error would simply be reflected with an error code of 7.
<tr><th>X'80'
This operation is not allowed, because there cannot be two threads that
</th><td><var>CANCEL</var> request on a <var>COPY</var> style <var>$Web_Rest_Recset</var> for an exclusively locked record set. If this bit is not set, this error would simply be reflected with an error code of 7.
have the same records locked in exclusive mode, which is what would be
This operation is not allowed, because there cannot be two threads that have the same records locked in exclusive mode, which is what would be the case after a <var>COPY</var> type restore of an exclusively locked record set.
the case after a COPY type restore of an exclusively locked record set.
</td></tr></table>
</dl>
In general, table full problems with saved record sets are best handled
In general, table full problems with saved record sets are best handled
(as are most system-wide resource shortages) with request cancellation,
(as are most system-wide resource shortages) with request cancellation,
because it does not make sense to code applications in a way that
because it does not make sense to code applications in a way that
would be able to detect and correct for these shortages.
would be able to detect and correct for these shortages.
 
[[Category:User parameters]]
[[Category:User parameters]]
[[Category:Parameters]]
[[Category:Parameters]]

Revision as of 16:56, 13 March 2012

Summary

Default value
X'00'
Parameter type
User
Where set
User and $Resetn resettable
Related products
All
Introduced
Before Sirius Mods 6.7

Description

This bitmask parameter makes it possible to change the default behavior of the $Web_Save_Recset and $Web_Save_List functions as well as the $Web_Restore_Recset and $Web_Restore_List functions.

By default, these $Web_Save functions act as if the STEAL, USTEAL and MOVE options were specified; these $Web_Restore functions act as if MOVE were specified. The default behavior of all of these functions can, however, be changed on a thread basis by setting the SRSPARM parameter (which can be reset with $Resetn).

SRSPARM is a bitmask user parameter where the bits mean:

X'01' Make ERROR the default for $Web_Save_Recset and $Web_Save_List.
X'02' Make CANCEL the default for $Web_Save_Recset and $Web_Save_List. If this bit is set, the X'01' bit is irrelevant.
X'04' Make UERROR the default for $Web_Save_Recset and $Web_Save_List.
X'08' Make UCANCEL the default for $Web_Save_Recset and $Web_Save_List. If this bit is set, the X'04' bit is irrelevant.
X'10' Make COPY the default for $Web_Save_Recset and $Web_Save_List.
X'20' CANCEL request on a COPY style $Web_Save_Recset for an exclusively locked record set. If this bit is not set, this error would simply be reflected with an error code of 7.

This operation is not allowed, because there cannot be two threads that have the same records locked in exclusive mode, which is what would be the case after a COPY type save of an exclusively locked record set.

X'40' Make COPY the default for $Web_Rest_Recset and $Web_Rest_List.
X'80' CANCEL request on a COPY style $Web_Rest_Recset for an exclusively locked record set. If this bit is not set, this error would simply be reflected with an error code of 7.

This operation is not allowed, because there cannot be two threads that have the same records locked in exclusive mode, which is what would be the case after a COPY type restore of an exclusively locked record set.

In general, table full problems with saved record sets are best handled (as are most system-wide resource shortages) with request cancellation, because it does not make sense to code applications in a way that would be able to detect and correct for these shortages.