$Delg Subsys: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (add prod authorization)
 
(18 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<span class="pageSubtitle">Delete subsystem-wide global</span>
<span class="pageSubtitle">Delete subsystem-wide global</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Delg_Subsys function is the [[DeleteGlobal (Subsystem subroutine)]].</p>
<p class="warn"><b>Note:</b> Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the <var>$Delg_Subsys</var> function is the <var>[[DeleteGlobal (Subsystem subroutine)|DeleteGlobal]]</var> subroutine.</p>


This function allows a user to delete a <var class="product">Model 204</var> "global variable" which has a subsystem-wide scope. Doing this will let the value of the $GETG function or dummy string ("?&amp;amp.") substitution for the variable default to the current system-wide or user global variable with the same name (depending on the scope search order). The order in which the different scopes of global variables are searched can be controlled using [[$SirParm]] parameters: for $GETG, with 'GETGSYS', and for dummy strings, with 'DUMMYSYS'.  
This function allows a user to delete a <var class="product">Model&nbsp;204</var> "global variable" which has a subsystem-wide scope. Doing this will let the value of the $GETG function or dummy string ("?&amp;amp.") substitution for the variable default to the current system-wide or user global variable with the same name (depending on the scope search order). The order in which the different scopes of global variables are searched can be controlled using [[$SirParm]] parameters: for $GETG, with 'GETGSYS', and for dummy strings, with 'DUMMYSYS'.  


The $Delg_Subsys function accepts two arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one.  
The <var>$Delg_Subsys</var> function accepts two arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one.  


The first argument is the name of the global variable to be deleted. This is an optional parameter; it defaults to the null string.  
The first argument is the name of the global variable to be deleted. This is an optional parameter; it defaults to the null string.  
Line 14: Line 14:
System administrator privileges are required to invoke this $function, unless the second argument is omitted or is the null string, and the $function is invoked from a precompiled procedure; in that case, no privileges are required, and the subsystem name used is the active subsystem.
System administrator privileges are required to invoke this $function, unless the second argument is omitted or is the null string, and the $function is invoked from a precompiled procedure; in that case, no privileges are required, and the subsystem name used is the active subsystem.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RC = $Delg_Subsys(glob_name, subsys_name)
<p class="syntax"><span class="term">%rc</span> = <span class="literal">$Delg_Subsys</span>([<span class="term">glob_name</span>], [<span class="term">subsys_name</span>])
<section end="syntax" /></p>
<p class="caption">$Delg_Subsys Function
</p>
</p>
<p class="caption">%RC is set to 0 or to an error indicator.</p>
 
<p class="code">  
<p>
0 - No errors
<var class="term">%rc</var> is set to 0 or to an error indicator.</p>
1 - Not system administrator
 
3 - Subsystem name missing
===Return codes===
</p>
<p class="code">0 - No errors
<p class="caption">$Delg_Subsys return codes
1 - Not system administrator
3 - Subsystem name missing
</p>
</p>


Retrieval of subsystem global variables is highly efficient; updates, however, are not, so use this $function appropriately.  
==Usage notes==
<ul>
<li>Retrieval of subsystem global variables is highly efficient; updates, however, are not, so use this $function appropriately.  


For an explanation of the use of subsystem global variables, see [[$Setg_Subsys]]. For an explanation of $SirParm, see [[$SirParm]].  
<li>For an explanation of the use of subsystem global variables, see <var>[[$Setg_Subsys]]</var>. For an explanation of <var>$SirParm</var>, see <var>[[$SirParm]]</var>.  
</ul>


This $function is new in Version 5.5 of the <var class="product">[[Sirius Mods]]</var>.<p>
==Products authorizing {{PAGENAMEE}}==
<ul class="smallAndTightList">
<li>[[Sirius Functions]]</li>
</ul>


[[Category:$Functions|$Delg_Subsys]]
[[Category:$Functions|$Delg_Subsys]]

Latest revision as of 22:04, 30 January 2018

Delete subsystem-wide global

Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Delg_Subsys function is the DeleteGlobal subroutine.

This function allows a user to delete a Model 204 "global variable" which has a subsystem-wide scope. Doing this will let the value of the $GETG function or dummy string ("?&amp.") substitution for the variable default to the current system-wide or user global variable with the same name (depending on the scope search order). The order in which the different scopes of global variables are searched can be controlled using $SirParm parameters: for $GETG, with 'GETGSYS', and for dummy strings, with 'DUMMYSYS'.

The $Delg_Subsys function accepts two arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one.

The first argument is the name of the global variable to be deleted. This is an optional parameter; it defaults to the null string.

The second argument is the name of the subsystem that the variable is associated with. This is an optional argument if the $function is invoked from within a subsystem; it defaults to the null string. A non-null subsystem name is required if the $function is invoked from outside a subsystem. If invoked from a subsystem and the second argument is null, the name of the subsystem is used.

System administrator privileges are required to invoke this $function, unless the second argument is omitted or is the null string, and the $function is invoked from a precompiled procedure; in that case, no privileges are required, and the subsystem name used is the active subsystem.

Syntax

%rc = $Delg_Subsys([glob_name], [subsys_name])

%rc is set to 0 or to an error indicator.

Return codes

0 - No errors 1 - Not system administrator 3 - Subsystem name missing

Usage notes

  • Retrieval of subsystem global variables is highly efficient; updates, however, are not, so use this $function appropriately.
  • For an explanation of the use of subsystem global variables, see $Setg_Subsys. For an explanation of $SirParm, see $SirParm.

Products authorizing $Delg_Subsys