Written by

Question Jainam Shah · 1 hr ago

ASTM E1394 message received as single line – segments not splitting in EnsLib.EDI.ASTM.Service.TCPService

Hi Team,

I am working on an ASTM interface using EnsLib.EDI.ASTM.Service.TCPService.

Environment

InterSystems Ensemble / IRIS (please specify your exact version)

Service class extending:

Class Custom.ASTM.Service.TCPService
Extends EnsLib.EDI.ASTM.Service.TCPService
{
Parameter EOTOPTIONAL = 1;

Parameter ADAPTER = "Custom.EDI.ASTM.Adapter.TCPAdapter"
}

Custom Adapter:

Include EnsEDIASTM
Class Custom.EDI.ASTM.Adapter.TCPAdapter Extends EnsLib.EDI.ASTM.Adapter.TCPAdapter
{
/// Use Carriage Return (ASCII 13) as line terminator
Property Terminators As %String [ InitialExpression = {$C(13)} ];
}
Scenario

I am receiving ASTM messages directly from a laboratory cdruby instrument (not using telnet or simulator).

Initially, I was getting an ASTM protocol error related to EOT.
After setting:

Parameter EOTOPTIONAL = 1;

the transmission worked.

However, now the ASTM message is being received as a single line, instead of being parsed into proper segments (H, P, O, R, L). I tried implementing ASCII 13, but still getting same issue.

In Message Viewer → Contents tab, the entire message appears inline instead of separate segments.

Error Observed

I am also seeing this error:

Build Map Status: ERROR <EnsEDI>ErrMapDocType: 
No ASTM schema structure is defined for DocType 'E1394'
Current Service Configuration

Framing: ASTM

DocType: E1394

EOTOptional: Enabled

(Please advise if I should be using ASTM:E1394 instead of just E1394.)

My Questions

   Why is the ASTM message not splitting into segments?

   Could this be due to:

   Instrument sending LF (0x0A) instead of CR (0x0D)?

   Incorrect DocType configuration?

   Schema category mismatch?

Is additional configuration required in ASTM TCPService to handle CRLF?

Any guidance on correct configuration for ASTM E1394 parsing would be greatly appreciated.

Thank you.

Product version: Ensemble 2018.1

Comments