What to do if a <PROTECT> error occurs when importing a routine with %
InterSystems FAQ rubric
To resolve the error <PROTECT>, remove the read-only attribute of the system-wide library database (IRISLIB for InterSystems IRIS, CACHELIB for Caché/Ensemble/HealthShare (Caché-based))
Once you have finished importing the routine, remember to change it back to read-only.
[Version 2013.1 and above]
[Management Portal] > [System Administration] > [Configuration] > [System Configuration] > [Local Database] Uncheck "Mount read-only" from the database name link.
.png)
[Version 2011.1 - Version 2012.2]
[Management Portal] > [System Administration] > [Configuration] > [System Configuration] > [Local Database] Change "Read-only?" from [Edit] of the relevant database.
[Version 2010.2 or earlier]
[System Management Portal] > [Configuration] > [Local Database] Change "Read-only?" from [Edit] of the relevant database.
Typically, the system-wide library database (IRISLIB/CACHELIB) stores routines with % that are reserved by InterSystems products (user-written routines with routine names %a* through %y* are stored in the system-wide library database (IRISLIB/CACHELIB).
When saving user-defined routines with % in the system, we recommend names starting with %Z or %z.
Routines starting with %Z, %z are stored in the system database ("IRISSYS" for InterSystems IRIS and "CAHESYS" for Caché/Ensemble/HealthShare) and are carried over when upgrading InterSystems products.
Please note that routines with % other than %Z and %z saved in the system-wide library database (IRISLIB/CACHELIB) will be deleted during upgrade.
Comments
%ALL namespace is another way to share routines/classes globally but without the need to modify CACHELIB/IRISLIB.
to be precise:
also classes & routines starting with %SYS. * exact with uppercase and dot go to IRISSYS / CACHESYS
https://docs.intersystems.com/iris20233/csp/docbook/DocBook.UI.Page.cls?KEY=GSA_config_namespace_addmap#GSA_config_namespace_addmap_global
Users should not add new %SYS classes though.