Question Mikhail Akselrod · Nov 11, 2020

Programmatical access to "System Mode"

Hi,

Please, advise how to programmatically set "System Mode" value.

Manually this value can be set via Management Portal > System > Configuration > Memory and Startup > System Mode dropdown.

Value can be programmatically obtained via $SYSTEM.Version.SystemMode() , but  I couldn't  find a programmatical way to set it.

Thank you.

Comments

Julius Kavay · Nov 11, 2020

A quick and dirty way:

set ^|"%SYS"|%SYS("SystemMode")="TEST" // or "LIVE" or "DEVELOPMENT" or "FAILOVER"
0
Eduard Lebedyuk  Nov 12, 2020 to Julius Kavay

Any value could be displayed, TEST and so on are just presets.

0
Timothy Leavitt · Nov 16, 2020

Rather than setting the global, could just Do $SYSTEM.Version.SystemMode(newMode) where newMode is LIVE, TEST, FAILOVER, or DEVELOPMENT (case-insensitive).

0
Mikhail Akselrod · Nov 16, 2020

@Timothy Leavitt 
Am I missing something?

==================================

%SYS 6d0>Do $SYSTEM.Version.SystemMode("LIVE")
 <PARAMETER>zSystemMode+1^%SYSTEM.Version.1

==================================

0
Timothy Leavitt  Nov 16, 2020 to Mikhail Akselrod

Ahh... looks like that's just in IRIS (2018.1+)

0