Skip to main content

Separators

Separators

A string specifying characters to be used as separators for encoding outbound X12 documents.

Although an X12 document includes a field to specify the separators it uses, the only supported way to modify the separators for an X12 virtual document is to specify the Separators setting.

The Separators setting is a string that specifies multiple separator characters. If Separators is not null, positions 1 through 3 (left to right) are interpreted as follows:

  1. Data Element Separator (ES); the default is an asterisk (*)

  2. Component Separator (CS); the default is a colon (:)

  3. Data Element Repeat Separator (RS); the default depends on the operation:

    • For SOAP-based operations, the default is a caret (^)

    • For all other operations, the default is a record separator (\a)

For Separators, you must supply a string of three characters which InterSystems IRIS assigns to X12 separators in left to right order: ES, CS, RS, as described in the previous list.

Any characters in positions 4 through 6 override the default segment terminator character, which is ~ (tilde). You may specify from 0 to 3 characters in positions 4 through 6 using the following:

  • \r for the carriage return (ASCII 13)

  • \n for the line feed (ASCII 10)

  • \a for the array record separator (ASCII 30)

You can use \x in positions 1 through 3 if you need to specify segment terminators in positions 4 and higher but want your output documents to use fewer than 3 separators. Separators designated by \x in positions 1 through 3 are not used. The purpose of \x is simply to extend the length of the list of separators so that position 4 is interpreted correctly as the first segment terminator.

If the Separators string is empty, the default is to use the current default separators and segment terminators for X12, plus a carriage return (ASCII 13) and line feed (ASCII 10), for example:

*:\a~\r\n
FeedbackOpens in a new tab