¡Hola desarrolladores!
Solo quiero compartir una antigua pero muy relevante buena práctica en el cambio de namespaces que @Dmitry Maslennikov compartió conmigo.
Consideremos el método:
classmethod DoSomethingInSYS() as %Status
{
set sc=$$$OK
set ns=$namespace
zn "%SYS"
// try-catch in case there will be an error
try {
// do something, e.g. config change
}
catch {}
zn ns ; returning back to the namespace we came in the routine
return sc
}