Thanks Rabert for quick reply.

when i created mynamespace in management portal, below log created.

Enabling namespace 'TEST' for Interoperability:
* This instance is not in a mirror
* Mappings
- Class:
 + Adding class mapping Ens -> ENSLIB
 + Adding class mapping EnsLib -> ENSLIB
 + Adding class mapping EnsPortal -> ENSLIB
 + Adding class mapping CSPX.Dashboard -> ENSLIB
- Routine:
 + Adding routine mapping Ens* -> ENSLIB
- Global:
 + Checking/fixing global directory settings for existing global ^EnsDICOM.Dictionary
 + Checking/fixing global directory settings for existing global ^EnsEDI.ASTM.Description
 + Checking/fixing global directory settings for existing global ^EnsEDI.ASTM.Schema
 + Checking/fixing global directory settings for existing global ^EnsEDI.Description
 + Checking/fixing global directory settings for existing global ^EnsEDI.Schema
 + Checking/fixing global directory settings for existing global ^EnsEDI.X12.Description
 + Checking/fixing global directory settings for existing global ^EnsEDI.X12.Schema
 + Checking/fixing global directory settings for existing global ^EnsHL7.Description
 + Checking/fixing global directory settings for existing global ^EnsHL7.Schema
 + Checking/fixing global directory settings for existing global ^IRIS.Msg
 + Checking/fixing global directory settings for existing global ^IRIS.MsgNames
 + Adding global mapping ^EnsDICOM.Dictionary -> ENSLIB
 + Adding global mapping ^EnsEDI.ASTM.Description("E1394") -> ENSLIB
 + Adding global mapping ^EnsEDI.ASTM.Schema("E1394") -> ENSLIB
 + Adding global mapping ^EnsEDI.Description("X","X12") -> ENSLIB
 + Adding global mapping ^EnsEDI.Schema("HIPAA_4010") -> ENSLIB
 + Adding global mapping ^EnsEDI.Schema("HIPAA_5010") -> ENSLIB
 + Adding global mapping ^EnsEDI.Schema("ISC_00401") -> ENSLIB
 + Adding global mapping ^EnsEDI.Schema("ISC_00405") -> ENSLIB
 + Adding global mapping ^EnsEDI.X12.Description("HIPAA_4010") -> ENSLIB
 + Adding global mapping ^EnsEDI.X12.Description("HIPAA_5010") -> ENSLIB
 + Adding global mapping ^EnsEDI.X12.Schema("HIPAA_4010") -> ENSLIB
 + Adding global mapping ^EnsEDI.X12.Schema("HIPAA_5010") -> ENSLIB
 + Adding global mapping ^EnsHL7.Description("2.3.1") -> ENSLIB
 + Adding global mapping ^EnsHL7.Description("2.5.1") -> ENSLIB
 + Adding global mapping ^EnsHL7.Description("2.7.1") -> ENSLIB
 + Adding global mapping ^EnsHL7.Description("2.8.1") -> ENSLIB
 + Adding global mapping ^EnsHL7.Description("2.8.2") -> ENSLIB
 + Adding global mapping ^EnsHL7.Description("ITK") -> ENSLIB
 + Adding global mapping ^EnsHL7.Description(2.1) -> ENSLIB
 + Adding global mapping ^EnsHL7.Description(2.2) -> ENSLIB
 + Adding global mapping ^EnsHL7.Description(2.3) -> ENSLIB
 + Adding global mapping ^EnsHL7.Description(2.4) -> ENSLIB
 + Adding global mapping ^EnsHL7.Description(2.5) -> ENSLIB
 + Adding global mapping ^EnsHL7.Description(2.6) -> ENSLIB
 + Adding global mapping ^EnsHL7.Description(2.7) -> ENSLIB
 + Adding global mapping ^EnsHL7.Description(2.8) -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema("2.3.1") -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema("2.5.1") -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema("2.7.1") -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema("2.8.1") -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema("2.8.2") -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema("ITK") -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema(2.1) -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema(2.2) -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema(2.3) -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema(2.4) -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema(2.5) -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema(2.6) -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema(2.7) -> ENSLIB
 + Adding global mapping ^EnsHL7.Schema(2.8) -> ENSLIB
 + Adding global mapping ^IRIS.Msg("Arial,Tahoma,Verdana") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("Confirm") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EDIDocumentView") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("Ens") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsAlert") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsBPL") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsColumns") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsDICOM") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsEDI") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsEDIEDIFACT") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsEDIHL7") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsEDISEF") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsEDIX12") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsEnt") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsLDAP") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsMQTT") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsPushNotifications") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsRecordMap") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsSAP") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsSR") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsSearchTable") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsWf") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsXPATH") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("EnsebXML") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("Ensemble") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("ITK") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("RuleEditor") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("Workflow") -> ENSLIB
 + Adding global mapping ^IRIS.Msg("tahoma,verdana") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("Arial,Tahoma,Verdana") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("Confirm") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EDIDocumentView") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("Ens") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsAlert") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsBPL") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsColumns") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsDICOM") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsEDI") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsEDIEDIFACT") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsEDIHL7") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsEDISEF") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsEDIX12") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsEnt") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsLDAP") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsMQTT") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsPushNotifications") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsRecordMap") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsSAP") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsSR") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsSearchTable") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsWf") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsXPATH") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("EnsebXML") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("Ensemble") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("ITK") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("RuleEditor") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("Workflow") -> ENSLIB
 + Adding global mapping ^IRIS.MsgNames("tahoma,verdana") -> ENSLIB
- Updating CPF
- Moving changes to active configuration
 - Loading new mappings for namespace 'TEST'
* Validating Installation in 'TEST'
- Checking class 'Ens.Director' ...
- Checking class 'Ens.MessageBody' ...
- Checking class 'Ens.StudioManager' ...
- Checking class 'EnsLib.HL7.Message' ...
* Mappings:
 + Adding class mapping HS -> HSLIB
 + Adding class mapping HSMOD -> HSLIB
- Routine:
 + Adding routine mapping HS.* -> HSLIB
 + Adding routine mapping HSMOD.* -> HSLIB
- Updating CPF
- Moving changes to active configuration
 - Loading new mappings for namespace 'TEST'
* Complete!
- Updating CPF
- Moving changes to active configuration
 - Loading new mappings for namespace 'TEST'
HS.Util.Installer.Foundation:Install User '_SYSTEM' has %Admin_Manage:USE privilege
HS.Util.Installer.Foundation:Install tComponent Foundation = TEST
HS.HC.Util.Installer:EnableEnsemble Created Ensemble Mappings
HS.HC.Util.Installer:EnableEnsemble Configuration Loaded
HS.HC.Util.Installer:EnableEnsemble Compiling Ensemble DeepSee Dashboard
HS.HC.Util.Installer:EnableEnsemble Ensemble Enabled
HS.Util.Installer.Foundation:SecureInstall Added Package mappings HS,HSMOD,SchemaMap
HS.Util.Installer.Foundation:SecureInstall Added include mappings HSMOD.*,SchemaMap*
HS.Util.Installer.Foundation:Install Created Portal CSP app
HS.Util.Installer.Foundation:CreateProduction Compiled template TESTPKG.FoundationProduction
HS.Util.Installer.Foundation:AdditionalSetup Set Credential HS_Services
HS.Util.Installer.Foundation:SecureInstall Recompiled XML extension classes
HS.Util.Installer.Foundation:SecureInstall Install TEST done at 2021-10-12 22:12:14
* Creating Interoperability Management Portal
- Not copying legacy CSP pages for portal application
- Configuring portal: /csp/healthshare/test [TEST] using C:\InterSystems\HealthConnect\CSP\healthshare\test
- Updating CSP Application: /csp/healthshare/test
   Type                 = [2]
   CookiePath           = [/csp/healthshare/]
   LockCSPName          = [1]
   NameSpace            = [TEST]
   CSPZENEnabled        = [1]
   GroupById            = [%ISCMgtPortal]
   ServeFiles           = [2]
   UseCookies           = [2]
- Removing legacy CSP pages and files from directory 'C:\InterSystems\HealthConnect\CSP\healthshare\test\'
- Not compiling portal '/csp/healthshare/test/' in TEST as no CSP files were copied
* Adding explicit SQL privileges to Interoperability Roles
- Adding SQL privileges for role '%EnsRole_Administrator'
- Adding SQL privileges for role '%EnsRole_AlertOperator'
- Adding SQL privileges for role '%EnsRole_Developer'
- Adding SQL privileges for role '%EnsRole_Monitor'
- Adding SQL privileges for role '%EnsRole_Operator'
- Adding SQL privileges for role '%EnsRole_RegistryManager'
- Adding SQL privileges for role '%EnsRole_RegistrySelect'
- Adding SQL privileges for role '%EnsRole_RulesDeveloper'
- Adding SQL privileges for role '%EnsRole_WebDeveloper'
* Adding Interoperability SearchTables
- Validating all SearchTable metadata
 - Regenerating metadata for EnsLib.EDI.ASTM.SearchTable
 - Regenerating metadata for EnsLib.EDI.EDIFACT.SearchTable
 - Regenerating metadata for EnsLib.EDI.X12.SearchTable
 - Regenerating metadata for EnsLib.EDI.XML.SearchTable
 - Regenerating metadata for EnsLib.HL7.SearchTable
 - Regenerating metadata for EnsLib.XML.SearchTable
* Checking for existing named message searches
- No saved message searches found in namespace 'TEST'; no conversion necessary.
* Checking DocClassMap
 + DocClassMap already present in namespace 'TEST'; no upgrade steps needed
* Checking for incorrect Timestamp indices
- No UTC index globals need to be repaired.
* Legacy CSP Portal not installed, so no legacy CSP pages recompiled.
* Generating meta data for Interoperability Analytics items
Replacing: Ens/Analytics/ActivityVolumeAndDuration.dashboard

Imported 1 item.
Encountered 0 errors during import.

* Setting new namespace flags
- Ens.Config SyncCommit already exists
Update Complete.
Done

Thanks Robert ,

my version is:

  IRIS for Windows (x86-64) 2020.1 (Build 215U) Mon Mar 30 2020 20:14:33 EDT [HealthConnect:2.1.0]

I literally struck from last two week only because of this issue. Could you please help me.

I need to execute below query in inbound adapter.

SELECT count(ID) into :suspendedCount FROM Ens.MessageHeader 

Marc mentioned in previous post His example business service is working fine for the same requirement.

What wrong with my HS version? or please show me the way forward.

Thanks a lot

Prashanth

Thanks Marc,

no luck , see the log below for exampleBS

^ztest("66029,63544.417241","SQLCODE")=-400
^ztest("66029,63544.41725","suspendedCount")=-1
^ztest("66029,63549.440962","SQLCODE")=-400
^ztest("66029,63549.440972","suspendedCount")=-1
^ztest("66029,63554.469506","SQLCODE")=-400
^ztest("66029,63554.469512","suspendedCount")=-1
^ztest("66029,63559.484237","SQLCODE")=-400
^ztest("66029,63559.484244","suspendedCount")=-1
^ztest("66029,63564.510576","SQLCODE")=-400
^ztest("66029,63564.510586","suspendedCount")=-1
^ztest("66029,63569.551258","SQLCODE")=-400
^ztest("66029,63569.551266","suspendedCount")=-1
^ztest("66029,63574.596674","SQLCODE")=-400
^ztest("66029,63574.596684","suspendedCount")=-1
^ztest("66029,63579.611594","SQLCODE")=-400
^ztest("66029,63579.611599","suspendedCount")=-1

Thanks Marc , you are correct. This code was written long back and available in live . I need to do some enhancements on top of the existing code. I have exported from live and deployed in my local HS setup for development.

I am seeing this error. Live still it is working fine. 

Is there any problem with my local HS installation?

Thanks,

Prashanth