keep only the COS routine object (cache object script) to preserve the source routine.mac
Import from DC-PT, @Edilson Eberle Carvalho
We have some *.mac routines and we need to preserve their source,
as these routines have intellectual authorship and can only be used per session
with the right to use (they cannot be viewed or edited).
The question: how to keep only the routine object in the IRIS namespace,
without interfering with its execution?
Go to the original post written by @Edilson Eberle Carvalho
Try this from %Library.Routine:
https://docs.intersystems.com/iris20243/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=%25Library.Routine#Delete
with flag=2
classmethod Delete(rtnname As %String, flag As %String = 0, supressbackup As %Boolean = 0, nsp As %String = $namespace) as %Status
Delete the routine rtnname. If the rtnname is not fully qualified we will resolve this into a fully qualified name first and then proceed with the rest of the delete. For example if you specify 'test' and there is a 'test.mac' it will resolve to this, if there was only a 'test.obj' it will resolve the name to this. The parameter flag specifies how much to delete. The options are:
@Robert Cemper
Thank you very much!