It's a bit difficult to answer this question in general. But I will try to give you some places to look at.

First Creating the databases on the terminal you would want to look at documentation for SYS.Database

so you might end up with a method or even key it in on the terminal like this

  ClassMethod createCacheDatabase(path As %String) As %Status [ Final, Private ]
#dim db as SYS.Database = ##class(SYS.Database).%New()
set db.BlockSize=8192
set db.Directory = path
set db.ExpansionSize=0
set db.ResourceName="%DB_%DEFAULT"
set db.NewGlobalCollation=5
quit db.%Save()

Now you have created you databases you need to tell cache to create a namespace using those.

The interface to do that sit's in the Config.Coniguration class. Please refer to Config.Configuration Class Documentation in the online documentation for more info about that interface.

The deprecated way was (sorry I've just reread that documentation):

What you will do is run ##class(Config.Configuration).AddNamespace(namespace,dbName,dbName) and after that maybe to some ##class(Config.Configuration).AddGlobalMapping(..)
The new interface to do a Namespace is in  Config.Namespace

  Regardless wich you want to use they are both pretty straight forward.

This is how you can create programmatically weather on terminal or from within your code a namespace, databases and the appropriate mappings.

Oh I should mention you have to be in "%SYS" NAMESPACE to be able to do this


I'm not sure if I'm missing something but you are actually not removing anything, you are simply setting the value at index xyz to the empty string.

If I understand correctly I think you could use

#dim i,cnt as %Integer = tList.Count()

for i=1:1:cnt

#dim key as %Integer = tClaim.Find(tList.GetAt(i))
do:(key>0) tClaim.RemoveAt(key)


As I said. if I understand your question correctly, that is actually removing everything from tClaim that is part of tList.