Create %All Namespace Programmatically
If anybody could give me some insight on creating the %All Namespace programmatically I would appreciate it. There are quite a few posts I found that reference its creation using the UI, but I cant seem to get passed some validations with any form of the below:
Set Properties("Globals")="%DBDEFAULT"
//Set Properties("Library")="IRISLIB"
Set Properties("Routines")="%DBDEFAULT"
//Set Properties("SysGlobals")="IRISSYS"
//Set Properties("SysRoutines")="IRISSYS"
Set Properties("TempGlobals")="IRISTEMP"
Set tSC=##class(Config.Namespaces).Create("%All",.Properties)The documentation for Config.Namespace references only 3 properties required out of the 4... I thought I might be hitting some weirdness with the namespace needing to be capitalized in the method, and that did not work... also there seems to be some magic regarding "%DBDEFAULT" regarding the Globals and Routine locations, but just specifiying the TempGlobals property did not work either.
Any help would appreciated!
Comments
I've succeeded with the code:
%SYS>s P("Globals")="%DEFAULTDB"
%SYS>s P("Library")="IRISLIB"
%SYS>s P("Routines")="%DEFAULTDB"
%SYS>s P("SysGlobals")="IRISSYS"
%SYS>s P("SysRoutines")="IRISSYS"
%SYS>s P("TempGlobals")="IRISTEMP"
%SYS>Set tSC=##class(Config.Namespaces).Create("%All",.P) zw tSC
tSC=1
%SYS>w $zv
IRIS for UNIX (Ubuntu Server LTS for x86-64) 2021.1 (Build 215) Wed Jun 9 2021 09:48:30 EDTMany thanks @Alexey Maslov ! looks like its %DEFAULTDB not %DBDEFAULT.
I think this would be enough:
Set P("Globals")="%DEFAULTDB"
Set tSC=##class(Config.Namespaces).Create("%All",.P)