$SirParm: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (misc cleanup)
 
(27 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<span class="pageSubtitle">Set user-specific value, controlling Sirius products</span>
<span class="pageSubtitle">Set user-specific value, controlling Sirius products</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $SirParm function.</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $SirParm function.</p>


This $function allows setting of parameters that affect the <var class="product">User Language</var> environment, much like the RESET command.  
This $function allows setting of parameters that affect the <var class="product">SOUL</var> environment, much like the <var>RESET</var> command.  


The <var>$SirParm</var> function accepts one to two arguments and returns a numeric result.  
The <var>$SirParm</var> function accepts one to two arguments and returns a numeric result.  


The first argument is the name of the parameter to be set or whose value is to be returned.  
==Syntax==
<p class="syntax"><span class="term">%result</span> = <span class="literal">$SirParm</span>(<span class="term">parm_name</span>, [<span class="term">new_value</span>])
</p>
 
===Syntax terms===
<table>
<tr><th>%result</th>
<td>A numeric variable set to the value of the parameter, which is either <var class="term">new_value</var> or the current parameter value if <var class="term">new_value</var> is not specified.</td></tr>


The second argument is the new value of the parameter. If this argument is omitted, the value of the parameter is not changed.  
<tr><th>parm_name</th>
<td>The name of the parameter to be set or whose value is to be returned. </td></tr>


All parameters updated by <var>$SirParm</var> are user values that are reset to their defaults when a user logs off. Once the value of any parameter is changed, it remains at the new value until explicitly changed via the <var>$SirParm</var> function or until the user logs off or is restarted at which point the parameter if set back to its default value.
<tr><th>new_value</th>
<td>The new value of the parameter. If this argument is omitted, the value of the parameter is not changed. </td></tr>
</table>


There are 4 types of parameters -
==Usage notes==
<table class="syntaxTable">
<ul>
<li>All parameters updated by <var>$SirParm</var> are user values that are reset to their defaults when a user logs off. Once the value of any parameter is changed, it remains at the new value until explicitly changed via the <var>$SirParm</var> function or until the user logs off or is restarted at which point the parameter if set back to its default value.
<p>
There are four types of parameters: </p>
<table class="thJustBold">
<tr><th>Flags</th>
<tr><th>Flags</th>
<td>These parameters have value either 0 or 1. Specifying a new value other than 0 results in these parameters being set to 1.</td></tr>
<td>These parameters have value either 0 or 1. Specifying a new value other than 0 results in these parameters being set to 1.</td></tr>
<tr><th>One byte</th>
 
<tr><th nowrap>One byte</th>
<td>These parameters have values from 0 to 255. Specifying a value outside this range results in the value being unchanged.</td></tr>
<td>These parameters have values from 0 to 255. Specifying a value outside this range results in the value being unchanged.</td></tr>
<tr><th>Halfword</th>
<tr><th>Halfword</th>
<td>These parameters have values from -32,767 to 32,767. Specifying a value outside this range results in the value being unchanged.</td></tr>
<td>These parameters have values from -32,767 to 32,767. Specifying a value outside this range results in the value being unchanged.</td></tr>
<tr><th>Fullword</th>
<tr><th>Fullword</th>
<td>These parameters have values from -(2**31 - 1) to 2**31 - 1. Specifying a value outside this range results in the value being unchanged.
<td>These parameters have values from -(2**31 - 1) to 2**31 - 1. Specifying a value outside this range results in the value being unchanged.</td></tr>
</td></tr></table>
</table>
 
<li>The following parameters can be changed with <var>$SirParm</var>:
 
<table>
<tr><th><var>DUMMYSYS</var></th>
<td>This is a flag that controls the order of access by dummy string substitution ("?&amp;") to the various scopes (user, subsystem, and system) of global variables. The order corresponding to the 0 and 1 values of DUMMYSYS are:
<table class="thJustBold">
<tr><th>0</th>
<td>first, user globals (those set by $SETG); <br> if not there, subsystem globals (those set by <var>$Setg_Subsys</var>); <br> otherwise, system globals (those set by <var>$Setg_Sys</var>)</td></tr>
 
<tr><th>1</th>
<td>first, subsystem globals (those set by <var>$Setg_Subsys</var>); <br> if not there, system globals (those set by $Setg_Sys); <br> otherwise, user globals (those set by <var>$SetG</var>)</td></tr>
</table>


==Syntax==
For examples of the effects of DUMMYSYS, see <var>[[$Setg_Subsys]]</var> and <var>[[$Setg_Sys]]</var>. </td></tr>
<p class="syntax"><section begin="syntax" />%result = $SirParm(parm_name, new_value)
<section end="syntax" /></p>
<p class="caption">$SirParm Function
</p>
<p class="caption">%result is set to the value of the parameter, which is either '''new_value''' or the current parameter value if '''new_value''' is not specified.</p>


The following parameters can be changed with $SirParm :
<tr><th><var>EDITMSG</var></th>
<td>This is a flag that allows suppression of certain messages issued by the <var class="product">Model 204</var> editor. When this flag is set to 0 (the default) all <var class="product">Model 204</var> editor messages are issued to the terminal as they usually are.
<p>
If this flag is set to 1, the message <code>M204.0525 WARNING CAN'T EDIT INTO PROCEDURE</code> is suppressed when editing a read-only procedure. In addition, the message <code>M204.0542 EDIT COMPLETE -...</code> is suppressed, and the command issued to leave the <var class="product">Model 204</var> editor (QUIT, END, GO) is placed into the global variable <var>SIR.EDIT.MSG</var>.</p></td></tr>


<table class="syntaxTable">
<tr><th><var>GETGSYS</var></th>
<tr><th>DUMMYSYS</th>
<td>This is a flag that controls the order of access by the $GETG function to the various scopes (user, subsystem, and system) of global variables. The order corresponding to the 0 and 1 values of GETGSYS are:


<td><table class="syntaxTable">
<table class="thJustBold">
<td colspan="2">This is a flag that controls the order of access by dummy string substitution ("?&amp;amp.") to the various scopes (user, subsystem, and system) of global variables. The order corresponding to the 0 and 1 values of DUMMYSYS are:</td></tr>
<tr><th>0</th>
<tr><th>0</th>
<td>first, user globals (those set by $SETG); :br if not there, subsystem globals (those set by $Setg_Subsys); :br otherwise, system globals (those set by $Setg_Sys)</td></tr>
<td>first, user globals (those set by $SETG); <br> if not there, subsystem globals (those set by <var>$Setg_Subsys</var>); <br> otherwise, system globals (those set by <var>$Setg_Sys</var>)</td></tr>
 
<tr><th>1</th>
<tr><th>1</th>
<td>first, subsystem globals (those set by $Setg_Subsys); :br if not there, system globals (those set by $Setg_Sys); :br otherwise, user globals (those set by $SETG)
<td>first, subsystem globals (those set by <var>$Setg_Subsys</var>); <br> if not there, system globals (those set by <var>$Setg_Sys</var>); <br> otherwise, user globals (those set by <var>$Setg</var>)</td></tr>
</td></tr></table>
For examples of the effects of DUMMYSYS, see [[$Setg_Subsys]] and [[$Setg_Sys]]. This flag is new in Version 5.5 of the <var class="product">[[Sirius Mods]]</var>.
<tr>
<th>EDITMSG</th>
<td>This is a flag that allows suppression of certain messages issued by the <var class="product">Model 204</var> editor. When this flag is set to 0 (the default) all <var class="product">Model 204</var> editor messages are issued to the terminal as they usually are. If this flag is set to 1, the message M204.0525 WARNING CAN'T EDIT INTO PROCEDURE, is suppressed when editing a read-only procedure. In addition, the message M204.0542 EDIT COMPLETE - .. is suppressed and the command issued to leave the <var class="product">Model 204</var> editor (QUIT, END, GO) is placed into the global variable SIR.EDIT.MSG.</td></tr>
<tr><th>GETGSYS</th>
<td><table class="syntaxTable">
<td>This is a flag that controls the order of access by the $GETG function to the various scopes (user, subsystem, and system) of global variables. The order corresponding to the 0 and 1 values of GETGSYS are:</td></tr>
<tr><th>0</th>
<td>first, user globals (those set by $SETG); :br if not there, subsystem globals (those set by $Setg_Subsys); :br otherwise, system globals (those set by $Setg_Sys)</td></tr>
<tr><th>1</th>
<td>first, subsystem globals (those set by $Setg_Subsys); :br if not there, system globals (those set by $Setg_Sys); :br otherwise, user globals (those set by $SETG)
</td></tr>
</table>
</table>


For examples of the effects of GETGSYS, see [[$Setg_Subsys]] and [[$Setg_Sys]].  
For examples of the effects of GETGSYS, see <var>[[$Setg_Subsys]]</var> and <var>[[$Setg_Sys]]</var>. </td></tr>


This flag is new in Version 5.5 of the <var class="product">[[Sirius Mods]]</var>.<tr><th>LISTFC</th>
<tr><th><var>LISTFC</var></th>
 
<td>This is a flag that controls the action to be taken by the [[List of $functions|Sirius $functions]] when they are unable to add an item to a $list, either because CCATEMP is full or because the architectural limit of what will fit in a $list has been reached.  
<td>This is a flag that controls the action to be taken by the ''[[Sirius Functions]]'' when they are unable to add an item to a $list, either because CCATEMP is full or because the architectural limit of what will fit in a $list has been reached. If the LISTFC flag is set to 0 (the original setting) the $function that is unable to add the list item returns an error code (normally 3 or -3). If the LISTFC flag is set to 1, this condition results in request cancellation and drives the APSY error proc if in a subsystem. Setting the LISTFC flag to 1 simplifies the use of $lists. Applications need not constantly check result codes from $list functions and instead can let an error proc deal with the problem. When the LISTFC flag is set and a $list function is unable to add an item to a list, the message M204.0441 CCATEMP FULL is issued and is also set as the last error message. Note that with the LISTFC flag set it is possible to get this message even when CCATEMP is not really full when a user reaches the architectural limit on the size of $lists.
<p>
If the LISTFC flag is set to 0 (the original setting) the $function that is unable to add the list item returns an error code (normally 3 or -3). If the LISTFC flag is set to 1, this condition results in request cancellation and drives the APSY error proc if in a subsystem. </p>
<p>
Setting the LISTFC flag to 1 simplifies the use of $lists. Applications need not constantly check result codes from $list functions and instead can let an error proc deal with the problem. When the LISTFC flag is set and a $list function is unable to add an item to a list, the message <code>M204.0441 CCATEMP FULL</code> is issued and is also set as the last error message. Note that with the LISTFC flag set it is possible to get this message even when CCATEMP is not really full when a user reaches the architectural limit on the size of $lists.</p>
</td></tr></table>
</td></tr></table>
</ul>


See also [[$Resetn]].
==See also==
<ul>
<li><var>[[$Resetn]]</var>
</ul>


<h2>Products authorizing {{PAGENAMEE}}</h2><ul class="smallAndTightList">
==Products authorizing {{PAGENAMEE}}==
<li>[[Sirius functions]]</li>
<ul class="smallAndTightList">
<li>[[List of $functions|Sirius functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Janus Open Client]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[Janus Open Server]]</li>
<li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Japanese functions]]</li>
<li>Japanese functions</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
 
</ul>
</ul>
<p class="caption">Products authorizing $SirParm
</p>


[[Category:$Functions|$SirParm]]
[[Category:$Functions|$SirParm]]

Latest revision as of 23:21, 6 October 2015

Set user-specific value, controlling Sirius products

Note: Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $SirParm function.

This $function allows setting of parameters that affect the SOUL environment, much like the RESET command.

The $SirParm function accepts one to two arguments and returns a numeric result.

Syntax

%result = $SirParm(parm_name, [new_value])

Syntax terms

%result A numeric variable set to the value of the parameter, which is either new_value or the current parameter value if new_value is not specified.
parm_name The name of the parameter to be set or whose value is to be returned.
new_value The new value of the parameter. If this argument is omitted, the value of the parameter is not changed.

Usage notes

  • All parameters updated by $SirParm are user values that are reset to their defaults when a user logs off. Once the value of any parameter is changed, it remains at the new value until explicitly changed via the $SirParm function or until the user logs off or is restarted at which point the parameter if set back to its default value.

    There are four types of parameters:

    Flags These parameters have value either 0 or 1. Specifying a new value other than 0 results in these parameters being set to 1.
    One byte These parameters have values from 0 to 255. Specifying a value outside this range results in the value being unchanged.
    Halfword These parameters have values from -32,767 to 32,767. Specifying a value outside this range results in the value being unchanged.
    Fullword These parameters have values from -(2**31 - 1) to 2**31 - 1. Specifying a value outside this range results in the value being unchanged.
  • The following parameters can be changed with $SirParm:
    DUMMYSYS This is a flag that controls the order of access by dummy string substitution ("?&") to the various scopes (user, subsystem, and system) of global variables. The order corresponding to the 0 and 1 values of DUMMYSYS are:
    0 first, user globals (those set by $SETG);
    if not there, subsystem globals (those set by $Setg_Subsys);
    otherwise, system globals (those set by $Setg_Sys)
    1 first, subsystem globals (those set by $Setg_Subsys);
    if not there, system globals (those set by $Setg_Sys);
    otherwise, user globals (those set by $SetG)
    For examples of the effects of DUMMYSYS, see $Setg_Subsys and $Setg_Sys.
    EDITMSG This is a flag that allows suppression of certain messages issued by the Model 204 editor. When this flag is set to 0 (the default) all Model 204 editor messages are issued to the terminal as they usually are.

    If this flag is set to 1, the message M204.0525 WARNING CAN'T EDIT INTO PROCEDURE is suppressed when editing a read-only procedure. In addition, the message M204.0542 EDIT COMPLETE -... is suppressed, and the command issued to leave the Model 204 editor (QUIT, END, GO) is placed into the global variable SIR.EDIT.MSG.

    GETGSYS This is a flag that controls the order of access by the $GETG function to the various scopes (user, subsystem, and system) of global variables. The order corresponding to the 0 and 1 values of GETGSYS are:
    0 first, user globals (those set by $SETG);
    if not there, subsystem globals (those set by $Setg_Subsys);
    otherwise, system globals (those set by $Setg_Sys)
    1 first, subsystem globals (those set by $Setg_Subsys);
    if not there, system globals (those set by $Setg_Sys);
    otherwise, user globals (those set by $Setg)
    For examples of the effects of GETGSYS, see $Setg_Subsys and $Setg_Sys.
    LISTFC This is a flag that controls the action to be taken by the Sirius $functions when they are unable to add an item to a $list, either because CCATEMP is full or because the architectural limit of what will fit in a $list has been reached.

    If the LISTFC flag is set to 0 (the original setting) the $function that is unable to add the list item returns an error code (normally 3 or -3). If the LISTFC flag is set to 1, this condition results in request cancellation and drives the APSY error proc if in a subsystem.

    Setting the LISTFC flag to 1 simplifies the use of $lists. Applications need not constantly check result codes from $list functions and instead can let an error proc deal with the problem. When the LISTFC flag is set and a $list function is unable to add an item to a list, the message M204.0441 CCATEMP FULL is issued and is also set as the last error message. Note that with the LISTFC flag set it is possible to get this message even when CCATEMP is not really full when a user reaches the architectural limit on the size of $lists.

See also

Products authorizing $SirParm