Call this sqlproc passing class and prop names:

ClassMethod Params(class, prop) As %String [SQLProc]
{
    set result = ""
    set param = ""
    for {
        set param = $$$defparamMemberNext(class,$$$cCLASSproperty,prop,$$$cPROPparameter,param)
        quit:(param ="")
        set value = $$$defMemberArrayGet(class,$$$cCLASSproperty,prop,$$$cPROPparameter,param)
        set result = result _ param _ "=" _ value _ ","
    }
    quit result
}

You need two task objects one of %SYS.Task class and another of your concrete implementation class. Call AssignSettings
 to merge settings. Example:

Set tTaskDefClass = "User.Task.MessageArchive"

Set tTaskObj = ##class(%SYS.Task).%New()
Set tTaskObj.NameSpace = "<NameSpace>"
Set tTaskObj.Name = "<tTaskName>"
Set tTaskObj.TaskClass = tTaskDefClass
Set tTaskObj.Description = "<tTaskDesc>"

Set tTaskDefObj = $System.OBJ.New(tTaskDefClass)
Set tTaskDefObj.BaseDir = "your value"
Set tStatus = tTaskObj.AssignSettings(tTaskDefObj)
Quit:$$$ISERR(tStatus) tStatus
Kill tTaskDefObj

Set tStatus = tTaskObj.%Save()

Can any Target Object be non-IRIS base?

Absolutely. The services you offer via IAM can be sourced anywhere. Both from InterSystems IRIS and not.

How can IAM help with non-IRIS services?

All the benefits you get from using IAM (ease of administration, control, analytics) are available for both InterSystems IRIS-based and non InterSystems  IRIS-based services

Use EnableConfigItem method of Ens.Director class to enable/disable business hosts programmatically.

If you want to enable/disable/modify several ensemble hosts, it's better to update them without updating production first and after that
update production. Also add longer timeout on production update.

set sc = ##class(Ens.Director).EnableConfigItem("Item1", 1, 0)
write:'sc $System.Status.GetErrorText(sc)
set sc = ##class(Ens.Director).EnableConfigItem("Item2", 1, 0)
write:'sc $System.Status.GetErrorText(sc)
set sc = ##class(Ens.Director).UpdateProduction(600)
write:'sc $System.Status.GetErrorText(sc)

 

Are you sure you want to change system routine?

Is there any particular reason why you want to replace Cache for IRIS in code?

Anyway, is IRISLIB database writable?

Here's how you can make database writable.

  • Open System Management Portal
  • Go To: Menu (upper right corner) -> Databases
  • Choose database you want to modify
  • Set/remove ReadOnly flag
  • Saave

It's really not recommended for IRISLIB.