EnsLib.HL7.Operation.FileOperation - Line Feed
Hi,
I am using a standard EnsLib.HL7.Operation.FileOperation to create files based on HL7 messages but I just realised that lines in the output file only contain CR (Character Return) but no LF (Line Feed). It is really important to have both as another system picking those files will fail otherwise...
Is there any way to configure this?
Thanks
Apparently this is exactly what I am looking for: intersystems help but the problem is that I would prefer to use the standard file operation rather than create a new custom one.
Writes a string to the file and appends to the string the characters specified in the LineTerminator property. By default, the LineTerminator is a carriage return followed by a line feed (ASCII 13, ASCII 10).
If your operating system requires a different value for the LineTerminator property, set the value in the OnInit() method of the business operation. For example:
You can also make the property value to be dependent on the operating system:
That worked!!!
Thank you so much
Have a look at the separators and framing settings in EnsLib.HL7.Operation.FileOperation. The sixth item in Separators is the segment terminator (carriage return in standard HL7) while Framing lets you change the message terminator (line feed in standard HL7). You can change these to non-standard values if needed.
From the separators documentation linked above:
Thank you @Antonio Garcia Martinez for raising this, as I've just learnt something important and @Marc Mundt for pointing me at the right place!