InterSystems FAQ rubric
It can be obtained with a List query of the %SYS.Namespace class.
1. Create a routine like this:
getnsp
set statement=##class(%SQL.Statement).%New()
set status=statement.%PrepareClassQuery("%SYS.Namespace","List")
set resultset=statement.%Execute()
while resultset.%Next() {
write resultset.%Get("Nsp"),!
}
quit2. Run it in your terminal
%SYS
DOCBOOK
SAMPLES
USER
The method of executing class queries introduced in this article can be applied in a variety of cases.



