Article
· Jan 29 1m read

Display the Production Configuration Items with Status

This code provide the configured production items with enabled or disabled status.

 

Include (Ensemble, EnsUI, EnsUtil)

Class Test.ProductionConfig
{

ClassMethod GetConfigItems() As %Status
{
Set tStatement = ##class(%SQL.Statement).%New()
Set tSC = tStatement.%PrepareClassQuery("Ens.Config.Production","EnumerateConfigItems")
Write tSC,!
Write "ConfigItemName"," ","Enabled",!
#Dim exp As %Exception.SystemException
#Dim rset As %SQL.StatementResult
Set rset = tStatement.%Execute()
Write rset,!
Write rset.%SQLCODE,!
While rset.%Next() {
Try {
Set tConfigName = rset.%GetData(1)
Set tEnabled = rset.%GetData(3)
Catch exp {
Write "CATCH",!
Write exp,!
Write exp.DisplayString(),!
}
Write $Get(tConfigName)," ",$Get(tEnabled),!
}
Quit tSC
}

}

Discussion (0)1
Log in or sign up to continue