@maxime keltsma 

You can traverse the entire global with a loop and $Order function.

A simple routine to traverse your global can be:

    Set ^DataTest = 3
    Set ^DataTest(1) = $lb("","1329","JMMK-G1D6")
    Set ^DataTest(2) = $lb("","1516","AMEV-GVPF")
    Set ^DataTest(3) = $lb("","2333","4QC6-4HW3")
    Set key = ""
    // Print the header filds
    Write "Reference", $Char(9), "Code"	, !	
        // first parameter is global and key, 
        // second parameter opredr to travers globa. 1 = ascending subscript order (the default) or –1 = descending
        // third is target that receives the value if the key is defined
        Set key = $Order(^DataTest(key),  1, data)
        If (key = "")
            Quit // Exit for loop
        Set reference = $ListGet(data, 2)
        Set code = $ListGet(data, 3)
        Write reference, $Char(9), code, !

Output o execution:

> Do Teste^Teste
> Reference Code
> 1329 JMMK-G1D6
> 1516 AMEV-GVPF
> 2333 4QC6-4HW3

See Using Globals Object Script Tutorial , $Order Function for more examples e details.

Hi @Scott Roth 

Like the @Jeffrey Drumm told, the problem are because the Database ENSLIB are Read Only. The error occur because you are using the Macros $$$FormatText and $$$Text.

When you use $$$Text macro, the macro try to create a entry in the global ^IRIS.Msg. The global ^IRIS.Msg is mapped from ENSLIB database that is by default Read Only. See imagem bellow that the ^IRIS.Msg("ENSEMBLE") is mapped, but the root global ^IRIS.Msg is mapped to the namespace data base.

To solve the compilation error do change calls to $$$Text("some text", "Ensemble") for some think like $$$Text("some text", "MyDomain")

Click in Replace all

Then compile:

For more information see the documentation String Localization and Message Dictionaries


Hi @Punit Shah 

Use the method LinkToFile below a example.

C:\temp before create the file:

Execute the code

Set file = ##Class(%Stream.FileBinary).%New()
Set statusCode = file.LinkToFile("c:\temp\test_file.txt")
If ($System.Status.IsError(statusCode))
  Do $System.Status.DisplayError(statusCode)
Do file.WriteLine($ListBuild("Some bin data"))
Write $System.Status.DisplayError(file.%Save())

After execution:

You can use add or remove programs too.

  • would I be correct to interpret 'CacheC' in the example command as the instance name of the Ensemble installation to be uninstalled? Or is that the folder name on the filesystem where it is in installed?

Is the instance name.

  • Not familiar with Windows Registry editing, so can I safely delete those two trees in the registry if i want a completely fresh start?

After uninstall and if you have only one installation yes.

Hi @Mark Sharman

In the Iris, the global where localized labels reside is ^IRIS.Msg("EnsColumns"):

This global is mapped from ENSLIB database that is read only, You can't set value to this Global. 

Uncheck the Mount Read-Only option, save then you can set the value of global:

I recommend that after you finish the configuration, comeback ENSLIB database to read only. 

Hi @prashanth ponugoti 

Are you using the Private Webserver? If yes this can be the issue, because InterSystems don't recommends then use of Private Webserver in production environment. Bellow a snippet of documentation:


If you expect very low volume of HTTP traffic, have limited demands for high availability and secure operation, the private web server may be suitable for your development and testing needs. However, for production use, InterSystems recommends installing your own separate copy of Apache, ideally on its own server, and configuring it to use our Web Gateway to communicate with InterSystems products. If you expect a high amount of HTTP traffic, require high availability in your web server, need to integrate with other sources of web information, or need a high degree of control over your web server, you should not use the private web server.

See the documentation:  Application Use Of InterSystems Web Server

For production environment install a Webgateway in a separate machine/container if possible.

Installing the Web Gateway


Hi @Martin Staudigel 

Create a custom client class, then override the method InvokeRequest. In the method set the property SSLCheckServerIdentity  of private property %HttpRequest to false .

Bellow a simple example:

Class User.FHIRRestClient Extends HS.FHIRServer.RestClient.HTTP

/// @API.Overridable<br>
/// InvokeRequest takes the Private %HttpRequest object - passed in as pRequest here -
/// and invokes the request. The HTTP response is stored as the HttpResponse property
/// of the HTTP request object. This method returns a reference to that property.<br>
/// @Input pRequest %Net.HttpRequest object.<br>
/// @Input pRequestMethod HTTP verb.<br>
/// @Input pPayload Input payload content, can be FHIR resource content or Patch content.<br>
/// @Input pRequestPath Request path, as derived by the invoked interaction-specific method.<br>
/// @Input pQueryString Query string, as derived by the invoked interaction-specific method.
Method InvokeRequest(pRequest As %RegisteredObject, pRequestMethod As %String, pRequestPath As %String, pQueryString As %String) As %RegisteredObject
  Set ..%HttpRequest.SSLCheckServerIdentity = 0
  Return ##Super(pRequest, pRequestMethod, pRequestPath, pQueryString)


Hi Andy.

Follows a very simple example:

Navigation Customized:

/// br.cjs.zen.TableNavigator
Class br.cjs.zen.TableNavigator Extends %ZEN.Component.tableNavigator

/// Este é o namespace XML para este componente.
Parameter NAMESPACE = "br.cjs.zen";

/// Contents of this composite component:
/// This is a set of paging buttons as well as text controls
/// to show the current page number.
XData Contents
<composite xmlns="http://www.intersystems.com/zen">
    <hgroup labelPosition="left" cellAlign="left">
        <!-- originally was a series of buttons -->
        <image id="btnFirst" onclick="zenThis.composite.gotoPage('first');" src="navigation/First.png"/>
        <image id="btnPrev"  onclick="zenThis.composite.gotoPage('prev');"  src="navigation/Previus.png"/>
        <image id="btnNext"  onclick="zenThis.composite.gotoPage('next');"  src="navigation/Next.png"/>
        <image id="btnLast"  onclick="zenThis.composite.gotoPage('last');"  src="navigation/Last.png"/>
        <!-- End -->
        <spacer width="20"/>
        <text id="pageNo" size="2" labelClass="tn-pageLabel" onchange="zenThis.composite.gotoPage(zenThis.getValue());" />
        <text id="pageCount" size="4" labelClass="tn-pageLabel" readOnly="true" />
        <spacer width="*"/>


Sample usage:

Hi Patrik,

For a better readability of code, switch the Quit command by Return in the portions of your code. where you relay want to return.

For example in this codesnippet in the While:

			W !, "BEGENING OF LOOP FOR: "_rs.articleCode
			IF (rs.article = article)
				SET unitCode = rs.unitCode

This Quit, only exit form While not from Method. Other problem is that the last line with Quit without argument can cause a <FUNCTION> error because doesn't return any value.

If I'm not miss understood, you can add a third parameter to use internally of method to check if the method needs to run or not. For example if the condition to stop is the unitCode is not blank change the signature of method and add the following line in the beginning of method:

A possible version to method is:

ClassMethod workpieceUnit(mainArticle As %String, article As %String, unitCode As %string = "") As %String
    Return:(unitCode '= "") unitCode
	&SQL(SELECT unit->unitCode INTO :unitCode FROM production_article.composition WHERE mainArticle = :mainArticle AND article = :article)
		W !, "Has Value"
		Return unitCode
		SET sql = "SELECT article, unit->unitCode,  production_article.composition_sqlArticleCode(article, type) AS articleCode FROM production_article.composition WHERE mainArticle = "_mainArticle_" AND type = 1",
		 	 rs = ##class(%SQL.Statement).%ExecDirect(,sql)
		WHILE rs.%Next()
			W !, "BEGENING OF LOOP FOR: "_rs.articleCode
			IF (rs.article = article)
				SET unitCode = rs.unitCode
				Return unitCode
			&SQL(SELECT COUNT(*) INTO :composition FROM production_article.composition WHERE mainArticle = :rs.article)
			IF (composition > 0)
				DO ..workpieceUnit(rs.article, article)
		W !, "END OF LOOP"
		Return unitCode
	Return ""

Hi Maciej,

You can execute this query to achieve what you want:

    WHEN Super [ 'InboundAdapter' THEN 'InboundAdapter'
    ELSE 'OutboundAdapter'
  END "Type"
    Super LIKE '%InboundAdapter%'
    OR Super LIKE '%OutboundAdapter%'

In the IRIS 2021.1

Name Super Type
Ens.Enterprise.MsgBank.BankTCPAdapter EnsLib.TCP.InboundAdapter,EnsLib.TCP.CountedCommon InboundAdapter
Ens.Enterprise.MsgBank.ClientTCPAdapter EnsLib.TCP.OutboundAdapter,EnsLib.TCP.CountedCommon OutboundAdapter
EnsLib.EDI.X12.Adapter.TCPInboundAdapter EnsLib.TCP.InboundAdapter InboundAdapter
EnsLib.EDI.X12.Adapter.TCPOutboundAdapter EnsLib.TCP.OutboundAdapter OutboundAdapter
EnsLib.EMail.InboundAdapter Ens.InboundAdapter InboundAdapter
EnsLib.EMail.OutboundAdapter Ens.OutboundAdapter OutboundAdapter
EnsLib.FTP.InboundAdapter EnsLib.File.InboundAdapter,EnsLib.FTP.Common InboundAdapter
EnsLib.FTP.OutboundAdapter Ens.OutboundAdapter,EnsLib.FTP.Common,EnsLib.File.Common OutboundAdapter
EnsLib.File.InboundAdapter Ens.InboundAdapter,EnsLib.File.Common InboundAdapter
EnsLib.File.OutboundAdapter Ens.OutboundAdapter,EnsLib.File.Common OutboundAdapter
EnsLib.Gateway.ServiceAdapter Ens.InboundAdapter InboundAdapter
EnsLib.HTTP.InboundAdapter EnsLib.TCP.InboundAdapter InboundAdapter
EnsLib.HTTP.OutboundAdapter Ens.OutboundAdapter OutboundAdapter
EnsLib.IWay.DSN.OutboundAdapter EnsLib.TCP.CountedOutboundAdapter OutboundAdapter
EnsLib.IWay.IBO.OutboundAdapter EnsLib.TCP.CountedOutboundAdapter OutboundAdapter
EnsLib.IWay.InboundAdapter EnsLib.TCP.CountedXMLInboundAdapter InboundAdapter
EnsLib.IWay.OutboundAdapter EnsLib.TCP.CountedOutboundAdapter OutboundAdapter
EnsLib.JMS.InboundAdapter Ens.InboundAdapter,EnsLib.JMS.Common InboundAdapter
EnsLib.JMS.OutboundAdapter Ens.OutboundAdapter,EnsLib.JMS.Common OutboundAdapter
EnsLib.JavaGateway.InboundAdapter Ens.InboundAdapter,EnsLib.JavaGateway.Common InboundAdapter
EnsLib.JavaGateway.OutboundAdapter Ens.OutboundAdapter,EnsLib.JavaGateway.Common OutboundAdapter
EnsLib.LDAP.Adapter.Outbound Ens.OutboundAdapter,EnsLib.LDAP.Adapter.Common OutboundAdapter
EnsLib.LDAP.OutboundAdapter Ens.OutboundAdapter OutboundAdapter
EnsLib.MFT.Adapter.Inbound Ens.InboundAdapter,EnsLib.MFT.Adapter.Common InboundAdapter
EnsLib.MFT.Adapter.Outbound Ens.OutboundAdapter,EnsLib.MFT.Adapter.Common OutboundAdapter
EnsLib.MQSeries.InboundAdapter Ens.InboundAdapter,EnsLib.MQSeries.CommonAdapter InboundAdapter
EnsLib.MQSeries.OutboundAdapter Ens.OutboundAdapter,EnsLib.MQSeries.CommonAdapter OutboundAdapter
EnsLib.MQTT.Adapter.Inbound Ens.InboundAdapter,EnsLib.MQTT.Adapter.Common InboundAdapter
EnsLib.MQTT.Adapter.Outbound Ens.OutboundAdapter,EnsLib.MQTT.Adapter.Common OutboundAdapter
EnsLib.PEX.InboundAdapter Ens.InboundAdapter,EnsLib.PEX.Common InboundAdapter
EnsLib.PEX.OutboundAdapter Ens.OutboundAdapter,EnsLib.PEX.Common OutboundAdapter
EnsLib.Pipe.InboundAdapter Ens.InboundAdapter,Ens.Util.Pipe InboundAdapter
EnsLib.Pipe.OutboundAdapter Ens.OutboundAdapter,Ens.Util.Pipe OutboundAdapter
EnsLib.SAP.OutboundAdapter EnsLib.IWay.OutboundAdapter OutboundAdapter
EnsLib.SOAP.CST.OutboundAdapter EnsLib.TCP.OutboundAdapter,EnsLib.SOAP.CST.Common OutboundAdapter
EnsLib.SOAP.InboundAdapter EnsLib.TCP.InboundAdapter InboundAdapter
EnsLib.SOAP.OutboundAdapter Ens.OutboundAdapter OutboundAdapter
EnsLib.SQL.InboundAdapter Ens.InboundAdapter,EnsLib.SQL.Common InboundAdapter
EnsLib.SQL.OutboundAdapter Ens.OutboundAdapter,EnsLib.SQL.Common OutboundAdapter
EnsLib.Siebel.HTTPOutboundAdapter EnsLib.HTTP.OutboundAdapter OutboundAdapter
EnsLib.TCP.CountedInboundAdapter EnsLib.TCP.InboundAdapter,EnsLib.TCP.CountedCommon InboundAdapter
EnsLib.TCP.CountedOutboundAdapter EnsLib.TCP.OutboundAdapter,EnsLib.TCP.CountedCommon OutboundAdapter
EnsLib.TCP.CountedXMLInboundAdapter EnsLib.TCP.InboundAdapter,EnsLib.TCP.CountedCommon,Ens.Util.XML.Reader InboundAdapter
EnsLib.TCP.CountedXMLOutboundAdapter EnsLib.TCP.CountedOutboundAdapter,Ens.Util.XML.Reader OutboundAdapter
EnsLib.TCP.DuplexAdapter Ens.InboundAdapter,Ens.OutboundAdapter InboundAdapter
EnsLib.TCP.FramedInboundAdapter EnsLib.TCP.InboundAdapter,EnsLib.TCP.FramedCommon,EnsLib.TCP.TextLineCommon InboundAdapter
EnsLib.TCP.FramedOutboundAdapter EnsLib.TCP.OutboundAdapter,EnsLib.TCP.TextLineCommon,EnsLib.TCP.FramedCommon OutboundAdapter
EnsLib.TCP.InboundAdapter Ens.InboundAdapter,EnsLib.TCP.Common InboundAdapter
EnsLib.TCP.OutboundAdapter Ens.OutboundAdapter,EnsLib.TCP.Common OutboundAdapter
EnsLib.TCP.TextLineInboundAdapter EnsLib.TCP.InboundAdapter,EnsLib.TCP.TextLineCommon InboundAdapter
EnsLib.TCP.TextLineOutboundAdapter EnsLib.TCP.OutboundAdapter,EnsLib.TCP.TextLineCommon OutboundAdapter
EnsLib.TN3270.OutboundAdapter EnsLib.IWay.IBO.OutboundAdapter OutboundAdapter
EnsLib.Telnet.OutboundAdapter Ens.OutboundAdapter OutboundAdapter
EnsLib.UDP.InboundAdapter Ens.InboundAdapter,EnsLib.UDP.Common InboundAdapter
EnsLib.UDP.OutboundAdapter Ens.OutboundAdapter,EnsLib.UDP.Common OutboundAdapter

Hi Andy,

The "problem" is that the Fetch is executed on the Namespace thats the zen page reside, and the data global doesn't exists or not mapped. A simple solution change the method to:

Method DataExtractionCurrent(Output tSC As %Status, pInfo As %ZEN.Auxiliary.QueryInfo) As %ResultSet [ ZenMethod ]
  New $Namespace
  set $Namespace = "DATAEXTRACTION"    
  #Dim result As %ScrollableResultSet = ##Class(%ScrollableResultSet).%New("%DynamicQuery:SQL")
  Set tSC=result.Prepare("SELECT * from FairWarning_Table_Local.Logs")
  Write !, tSC    //  value of 1
  Set tSC = result.Execute()
  Write !, tSC    //  value of 1
  Set tSC = result.%Save() // The class use temp globals that are mapped
  Write !, tSC    //  value of 1
  Return result

Bellow a test if your code:

The suggested code: