This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > ENSLIB namespace > EnsLib.EDI.X12.Util.IOFraming

EnsLib.EDI.X12.Util.IOFraming

abstract class EnsLib.EDI.X12.Util.IOFraming

Property Inventory

Method Inventory

Parameters

parameter SETTINGS = Framing:Connection:selector?context={Ens.ContextSearch/getDisplayList?host=@currHostId&prop=Framing};

Properties

property %outFraming as %String [ InitialExpression = "uninitialized" ];
Framing to use on output if input framing is "Flexible"
Property methods: %outFramingDisplayToLogical(), %outFramingGet(), %outFramingIsValid(), %outFramingLogicalToDisplay(), %outFramingLogicalToOdbc(), %outFramingNormalize(), %outFramingSet()
property DefCharEncoding as %String (MAXLEN = 20) [ InitialExpression = "latin1" ];
Default Character Encoding to use when reading or writing X12 Documents.

Choices you can use for this setting include:

  • Native - use the default character encoding of the installed locale of the Ensemble server
  • latin1 - the ISO Latin1 8-bit encoding; this is the default
  • ISO-8859-1 - the ISO Latin1 8-bit encoding
  • UTF-8 - the Unicode 8-bit encoding
  • Unicode - the Unicode 16-bit encoding (Little-Endian)
  • UnicodeBig - the Unicode 16-bit encoding (Big-Endian)
  • Any other NLS definitions installed on this Ensemble server
  • @<ttable> - <ttable> means a raw InterSystems character translation table name. A prefix of '@' means to use the named table.
Property methods: DefCharEncodingDisplayToLogical(), DefCharEncodingGet(), DefCharEncodingIsValid(), DefCharEncodingLogicalToDisplay(), DefCharEncodingLogicalToOdbc(), DefCharEncodingNormalize(), DefCharEncodingSet()
property Framing as %String (DISPLAYLIST = ",None,Epic02/03,Ascii11/28,Ascii11,AsciiLF,AsciiCR,MLLP,MLLP11/28,MsgEnvelope,MLLPMsgEnvelope") [ InitialExpression = "None" ];
X12 Document outbound framing protocol; options:
- None : No framing - Each document is output without prefix or suffix characters
- Epic02/03 : same as Ascii02/03 : EPIC sometimes uses this for TCP. Frame documents with an Ascii(02) prefix character before each document and an Ascii(03) suffix character
- Ascii[nn]/[mm] : Frame documents with an Ascii(nn) prefix character before each document and an Ascii(mm) suffix character, but no trailing Ascii(13) as in MLLP
- Ascii[nn] : Frame documents with an Ascii(nn) suffix character separating each document from the subsequent one.
- AsciiLF : Frame documents with Ascii(10) (Linefeed) separating each document from the subsequent one
- AsciiCR : Frame documents with an extra Ascii(13) (Carriage Return) separating each document from the subsequent one
- MLLP : Minimal Lower Level Protocol (HL7 style) - Frame each X12 Document with Ascii(11) prefix and Ascii(28,13) suffix
- MLLP[nn]/[mm] : Minimal Lower Level Protocol - Frame each X12 Document with Ascii(nn) prefix and Ascii(mm),Ascii(13) suffix
- MsgEnvelope : Use the document's Envelope property verbatim if it is present. The string <!--X12DOC--> if present in the Envelope will be replaced with the document content. Otherwise the document will simply follow the 'Envelope' text
- MLLPMsgEnvelope : Same as 'MsgEnvelope', but with MLLP prefix and suffix also around the document inside the 'Envelope'

Note: All Ascii values should be given in decimal; Ascii(120) ('x') is not allowed as an Ascii framing character. Also, if an asterisk (*) is appended to the framing specification, Flexible framing will be used in parsing received acknowledgement response messages. Otherwise the response messages will be expected with the same kind of framing as that specified here for outbound messages.

Property methods: FramingDisplayToLogical(), FramingGet(), FramingIsValid(), FramingLogicalToDisplay(), FramingLogicalToOdbc(), FramingNormalize(), FramingSet()

Methods

method OutputFramedToDevice(pDoc As EnsLib.EDI.X12.Document, pSeparators As %String, pInbound As %Boolean = 0, ByRef pIOLogEntry As Ens.Util.IOLog = $$$NULLOREF, pDoFraming As %Integer) as %Status
method OutputFramedToIOStream(pIOStream As %IO.I.CharacterStream, pDoc As EnsLib.EDI.X12.Document, pSeparators As %String, pInbound As %Boolean = 1, ByRef pIOLogEntry As Ens.Util.IOLog = $$$NULLOREF, pDoFraming As %Integer = 1) as %Status
Write an X12 Document to the given IO Stream Returned %Status codes are not logged, except for Exceptions pDoFraming: 0=no framing, 1=full framing, -1=prefix only, 2=suffix only
method SetOutFraming(pFraming As %String)
Call this method after initializing or resetting the parser to force a particular output framing style different from the input framing style that is either specified or detected.

Subclasses