From m204wiki
Jump to navigation Jump to search

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.


%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