When you run $zf(-100) from IRIS session terminal the external process is run in the OS context (secutity/permissions) of the OS user loggen in.

When $zf(-100) is run by a storedproc or studio is run in the OS context (secutity/permissions) of the OS user used by the IRIS instance.

You have permission and/or environment issue.

Why run python using $zf(-100)? You can use embedded python to avoid this issues, it is simpler and have better performance.

Despite the lack of details in the question, using a lot of imagination and fantasy, my guess is that you are using ^%SYS.MONLBL or ^PERFMON or %Monitor.System package classes.

If my guess is correct, then I'd suggest to check the chapter "Estimate Memory Requirements" in the "Examining Routine Performance Using ^%SYS.MONLBL" documentation page.

I'm not sure I understand your question, probably not.

If you need to transform a message and then apply/evaluate rules, then create two HL7 Routing Business Processes, each with a Routing Rule associated.

The first BP and associated rule transform the message and send it to the second BP where you can apply rules to the transformed message.

But....probably I did not understand the question! 😊

You already answered your question....in the question! 😊

From %SYS namespace, use the List class query in the Config.Namespaces class:

%SYS>Set ResultSet=##class(Config.Namespaces).ListFunc()
 
%SYS>Do ResultSet.%Display()
Namespace       Globals Routines        System Globals  System Routines LibraryTemp Storage
%ALL    %DEFAULTDB      %DEFAULTDB      IRISSYS IRISSYS IRISLIB IRISTEMP
%SYS    IRISSYS IRISSYS IRISSYS IRISSYS IRISLIB IRISTEMP
USER    USER    USER    IRISSYS IRISSYS IRISLIB IRISTEMP
 
5 Rows(s) Affected
%SYS>

 Or, if you prefer:

%SYS>Set statement=##class(%SQL.Statement).%New()
 
%SYS>Set status=statement.%PrepareClassQuery("Config.Namespaces","List")
 
%SYS>Set resultset=statement.%Execute()
 
%SYS>While resultset.%Next() {  Write resultset.%Get("Namespace"),$c(9),resultset.%Get("Globals"),$c(9),resultset.%Get("Routines"),!}
%ALL    %DEFAULTDB      %DEFAULTDB
%SYS    IRISSYS IRISSYS
USER    USER    USER
 
%SYS>