Home > Class Reference > %SYS namespace > %SYS.System

%SYS.System

abstract class %SYS.System extends %SYSTEM.Help

The %SYS.System class provides an interface for managing utility functions.

You can call help to get a list of all entrypoints:

Do $system.Util.Help()

Method Inventory

Methods

classmethod ClearSwitch(switch As %Integer) as %Status [ Language = objectscript ]
Clear a switch on local system (error if switch is already clear)
classmethod GetCPFFileName() as %String [ Language = objectscript ]
Returns the active CPF file name.
classmethod GetDefaultSignatureHash(defaultSignatureHash As %String) as %Status [ Language = objectscript ]
Get the DefaultSignatureHash property from Security.System
classmethod GetInstanceName() as %String [ Language = objectscript ]
Returns instance name.
classmethod GetNodeName(Flag As %Integer = 0) as %String [ Language = objectscript ]
Returns the node name of the machine you are running on.
Parameters:
Flag = 0 (default) - Node name is the capitalized FQDN of the node, which will include the domain name.
For example:

HEARTOFGOLD.INTERNAL.COM

Flag = 1 - Node name of the machine as defined in the O/S.
For example:

HeartOfGold
classmethod GetUniqueInstanceName(Flag As %Integer = 0) as %String [ Language = objectscript ]
Returns NodeName:InstanceName.
This method returns the Node name of the system followed by a ":" followed by the Instance name. This name will be unique among InterSystems IRIS Instances in your network.
Parameters:
Flag = 0 (default) - Node name is the capitalized FQDN of the node, which will include the domain name.
For example:

HEARTOFGOLD.INTERNAL.COM:101U

Flag = 1 - Node name does not contain the domain name.
For example:

HEARTOFGOLD:101U
classmethod InstanceGUID() as %String [ Language = objectscript ]
Returns instance GUID.
An instance GUID is a 16 byte (128 bit) globally unique identifier, assigned per instance of InterSystems IRIS installation.
classmethod SetSwitch(switch As %Integer) as %Status [ Language = objectscript ]
Set a switch on local system (error if switch is already set)
classmethod TempDirectory() as %String [ Language = objectscript ]
Returns the location of the Temp directory, where temporary files are kept.
classmethod ToggleSwitch(switch As %Integer, NewState As %Integer) as %Status [ Language = objectscript ]
System Switches
Switches are used to inhibit certain kinds of processing while utilities such as Backups are being run.
Switches 8 & 9 may be of use for specialized customer applications:
Switch 8 - Inhibits responding to net requests
Switch 9 - Inhibits new network signons
The remaining switches are used to quiesce the system or provide a static environment for doing backups or examining the system
Switches 10, 12 and 13 are normally set the user is running backups
Switch 14 may be used to maintain application consistency or block contention
Switch 10 - Inhibits all global access except for the calling job
This switch is used with backups to coordinate with Transaction Processing. Use of this switch makes sure there are no transactions open when you clear the journal after you complete your backup. Switch 12 - Inhibit attempts to sign on Switch 13 - Inhibit sets, kills, and zsaves Switch 14 - Inhibit access to globals and routines
The following system functions for manipulating switches are provided:
Toggle a switch (from set to clear or clear to set) on local system
Set a switch on local system (error if switch is already set)
Clear a switch on local system (error if switch is already clear)
Toggle a switch (from set to clear or clear to set) on local system
classmethod WriteToConsoleLog(Message As %String, Flag As %Integer = 0, Severity As %Integer = 0, Event As %String = "Utility.Event") as %Status [ Language = objectscript ]
Write a message to the messages.log file.
Flag = 1 - write it to the operator console as well
Severity - severity of condition
Severity = -2 (Debug2), -1 (Debug), 0 (Information), 1 (Warning), 2 (Severe), 3 (Fatal)
classmethod WriteToMVLog(Message As %String, Severity As %Integer = 0) as %Status [ Language = objectscript ]
Write a message to the mv.log file.
Severity = -2 (Debug2), -1 (Debug), 0 (Information), 1 (Warning), 2 (Severe), 3 (Fatal)

Inherited Methods