Question Mikhail Khomenko · Nov 1, 2021

Globals export exclusion

Hello everyone,
I'd like to export Ensemble globals, but without Ensemble messages, this way:

^^database>s list("Ens*.gbl,'Ens.Message*.gbl")=""
^^database>write $SYSTEM.OBJ.Export(.list, "/tmp/globals.xml")

Documentation says that it could be done by adding an apostrophe, but it doesn't work for me - all Ens* globals are still exported.
What I'm doing wrong? Thanks!

Product version: IRIS 2020.1

Comments

Robert Cemper · Nov 1, 2021
'Ens.Message*.gbl

Exclusion does not work with * 

and GBL should be upper case
 

0
Mikhail Khomenko  Nov 1, 2021 to Robert Cemper

Thank you for response!
But it looks like documentation should be updated in that case as it provides such an example -)

You can also use ? or * wild cards and if you wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*.cls,'User.T*.cls".
0
Vic Sun  Nov 1, 2021 to Mikhail Khomenko

Hello Mikhail,

It looks like on IRIS 2021.1, global exports don't support wildcard exclusions, but they do work for class exports (as the class reference example suggests).

$SYSTEM.OBJ.Export can handle many different item types - I'll put in a request that we narrow the documentation.

0
Mikhail Khomenko  Nov 1, 2021 to Vic Sun

Hello Vic,
Thank you for response!
Unfortunately, this also doesn't work for me (uppercase GBL & no wildcard in exclusion):

^^data_dir>set list("Ens*.GBL,'Ens.MessageBodyD.GBL")=""
^^data_dir>write $SYSTEM.OBJ.Export(.list, "/tmp/globals.xml")

Btw, I'm using IRIS 2020:

IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2020.1 (Build 215U)
0
Vic Sun  Nov 1, 2021 to Mikhail Khomenko

I'll pass that along as well.

0
Robert Cemper · Nov 1, 2021

This total ODD !  But it works.
The list doesn't allow Carret ^ for the positive Globals
for globals to skip Carret ^ is required !!!


ENS>set list="Ens.*.GBL,'^Ens.Me*.GBL,'^Ens.C*.GBL"
ENS>ENS>set sc=$system.OBJ.Export(.list)
;; output skipped ;;
ENS>ZWRITE    ;processed Globals
list("^Ens.ActiveMessage.gbl")=""
list("^Ens.AppData.gbl")=""
list("^Ens.BP.ContextD.gbl")=""
list("^Ens.BP.ThreadD.gbl")=""
list("^Ens.BP.ThreadI.gbl")=""
list("^Ens.BusinessProcessD.gbl")=""
list("^Ens.BusinessProcessI.gbl")=""
list("^Ens.Debug.gbl")=""
list("^Ens.DocClassMap.gbl")=""
list("^Ens.JobStatus.gbl")=""
list("^Ens.Mirror.gbl")=""
list("^Ens.Queue.gbl")=""
list("^Ens.Rule.gbl")=""
list("^Ens.Util.IOLogD.gbl")=""
list("^Ens.Util.IOLogI.gbl")=""
list("^Ens.Util.LogD.gbl")=""
list("^Ens.Util.LogI.gbl")=""
list("^Ens.Util.ScheduleD.gbl")=""
sc=1
My interpretation:
First, a local array is collected, and then the negated subscripts are deleted (requiring now ^   !!)
0
Evgeny Shvarov  Nov 2, 2021 to Robert Cemper

Wow. Great investigation. But definitely not what I would name "intuitive"

0