Discussion (5)0
Log in or sign up to continue

Export it as XML. Store in VCS with code. Import with the rest of the code.

Other option is to store it as XData, here's sample code:

XData DisplayProperies
{
<Export generator="Cache">
<Global>
<Node><Sub>^Test</Sub>
<Node><Sub>1</Sub>
<Data>123</Data>
</Node>
<Node><Sub>Val2</Sub>
<Data>prop3</Data>
</Node>
<Node><Sub></Sub>
<Data>prop1</Data>
</Node>
</Node>
</Global>
</Export>
}

/// Set global
/// do ##class(Class.Installer).setGlobal()
ClassMethod setGlobal() As %Status
{
    #dim sc As %Status = $$$OK
    #dim className As %String = $classname()
    
    // search for XData: DisplayProperies
    #dim xdata As %Dictionary.CompiledXData = ##class(%Dictionary.CompiledXData).IDKEYOpen(className, "DisplayProperies",, .sc)
    quit:$$$ISERR(sc) sc

    set stream = xdata.Data
    set sc = $system.OBJ.LoadStream(stream, "/displaylog=0 /displayerror=0")
    quit sc
}

just run $System.OBJ.Export() for your Global and hand over the result to your CVS.

USER>s sc=$system.OBJ.Export("^rcc.GBL","exportTest.txt",,.error,"UTF8")
 
Exportieren in XML gestartet am 04/01/2018 10:25:26
Exportiere Global: ^rcc

the result is a nice XML structure

and $system.OBJ.Import()  reloads it  

The extension  .GBL is the important thing

http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?P...