Question
· Feb 25, 2022

How to change segment and message terminators (CR,LF,CRLF) in DTL ?

Hello Community, 

Could anyone let me know the process to change segment/message terminators Eg: CR -> CRLF etc. inside the DTL ? 

Thanks 

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

Hi,

Can you please provide an example of what you are doing in the DTL?

As far as I know, the DTL does not handle the line-endings, but rather at deserialization of the input to the source object, and at the serialization of the target object into whichever format it is put it, which is after the executed of the DTL.

i.e. Source Data -> Deserialize into object -> DTL -> serialize object into File/XML, etc.

The source and targets can be Record Maps, Virtual Docs and any other object you can think of.

Hi,

Assuming your question is about HL7 (or EDI) message serialization.

The DTL is meant for parsing and transforming the message into another one.
Serialization occurs when you output the message using the corresponding instance methods.

For an instance of the EnsLib.HL7.Message class, methods that output the message such as OutputToFile() are using instance properties to determine what separators to use : .Separators, .SegmentTerminator.

Also, business operations (extending EnsLib.HL7.Operation.Standard) expose a setting (Separators) that let you configure what separators to use.