Question
· Apr 1, 2017

Is there an option to export globals in archive?

Hi, Community!

Is there an option to get an archived file of globals in one command. Say for:

Do $System.OBJ.Export("Class1*D.GBL,Class2*D.GBL","data_gbl.xml")

get something like:

Do $System.OBJ.Export("Data*D.GBL","data_gbl.gz","gzip")

And also to have the convenient one click way to  import it to the namespace via terminal or Control Panel?

If anyone already has this module, share please?

It would be very convenient for import/export/continuous integration purposes cause globals can be really heavy.

Discussion (8)3
Log in or sign up to continue

Hi Evgeny,

Not exactly one command, but it can be done on one line...

set file="foo.zip" do $System.OBJ.ExportToStream("foo*.GBL",.s) open file:("WNS":/GZIP=1) use file Do s.OutputToDevice() close file do s.Clear()

This should work in reverse opening the file with the GZIP flag, read the contents to a temporary binary stream and then using the $System.OBJ.LoadStream on the temp binary stream.

Sean.