Settings for X12 Business Operations
X12 business operations have the following settings:
|Basic Settings||File Name||section in this topic|
|Additional Settings||Search Table Class, Default Char Encoding||“Settings for Business Operations” in Ensemble Virtual Documents|
|Auto Batch Parent Segs, No Fail While Disconnected, Separators, Validation, Reply Code Actions, Failure Timeout||sections in this topic|
The remaining settings are either common to all business operations or are determined by the type of adapter. For information, see:
“Settings for All Business Operations” in Configuring Ensemble Productions
“Settings for the File Outbound Adapter” in Using File Adapters with Ensemble
“Settings for the FTP Outbound Adapter” in Using FTP Adapters with Ensemble
“Settings for the TCP Outbound Adapter” in Using TCP Adapters with Ensemble
EnsLib.X12.Adapter.TCPOutboundAdapter has the following settings configured appropriately for X12:
Connect Timeout has its usual default of 5 seconds, but has a maximum limit of 30,000 seconds.
Get Reply is set to False. This means the adapter will wait to read a reply message back from the socket before returning.
Response Timeout has a default of 30 instead of its usual 15, and has a maximum limit of 30,000 seconds.
Auto Batch Parent Segs
(File and FTP only) If True, when writing a document that has a batch parent, output the batch header segments first, then child documents, then follow up with the batch trailer segments when triggered by the final batch header document object or by a file name change. If False, omit headers and trailers and output child documents only. The default for X12 is True.
Default Char Encoding
Specifies the desired character set of output data. Ensemble automatically translates the characters to this character encoding. For X12 output, the default is Latin1. See “Default Char Encoding” in “Settings for X12 Business Services.”
The number of seconds during which to continue retry attempts. After this number of seconds has elapsed, the business operation gives up and returns an error code. X12 business operations automatically set this value to –1 for never time out to ensure that no X12 document is skipped.
(File and FTP only) Output file name. This setting can include Ensemble time stamp specifiers. If you leave File Name blank, the default value is %f_%Q where:
%f is the name of the data source, in this case the input filename
_ is the literal underscore character, which will appear in the output filename
%Q indicates ODBC format date and time
In substituting a value for the format code %f, Ensemble strips out any of the characters |,?,\,/,:,[,],<,>,&,,,;,NUL,BEL,TAB,CR,LF, replacing spaces with underscores (_), slashes (/) with hyphens (-), and colons (:) with dots (.).
For full details about time stamp conventions, including a variety of codes you can use instead of the default %f_%Q, see “Time Stamp Specifications for Filenames” in Configuring Ensemble Productions.
No Fail While Disconnected
(TCP only) If True, suspend counting seconds toward the Failure Timeout while disconnected from the TCP server. This setting does not apply if Failure Timeout is –1 or if Stay Connected is 0.
Reply Code Actions
(TCP only) When the adapter setting Get Reply is True, this setting allows you to supply a comma-separated list of code-action pairs, specifying which action the business operation will take on receipt of various types of acknowledgment documents. The format of the list is:
code=action,code=action, ... code=action
Where code represents a literal value found in field TA1:4, AK5:1, or AK9:1 of the acknowledgment document. The following table lists the expected values for code.
|E||Accepted, But Errors Were Noted|
|M||Rejected; Message Authentication Code (MAC) Failed|
|W||Rejected; Failed Validity Tests|
|X||Rejected; Content Decryption Failed|
|~||The tilde character matches replies that do not contain a TA1, AK5 or AK9 segment|
|_||The underscore character matches replies with an empty value in the field. An empty or whitespace code value is the same as _|
|*||The asterisk character matches any value not matched otherwise (default=S)|
|I?||Matches the case in which the reply ControlId does not match the ControlId of the original document|
The following values for action may be used alone or combined to form strings. S is the default action if no other is given, except for A whose default action is C:
|C||Treat the document as Completed OK. Code A has a default action of C.|
|W||Log a warning but treat the document as Completed OK.|
|R||Retry the document according to the configured RetryInterval and FailureTimeout; finally Fail unless a different action is also specified|
|S||Suspend the document, log an error, and move on to try the next document. S is the default action for all codes except for code A, which has a default action of C.|
|D||Disable the business operation, log an error and restore the outbound document to the front of the business operation’s queue|
|F||Fail with an error and move on to try the next document|
The default value for this setting string is:
A=C — When the action is accepted, treat the document as Completed OK.
I?=W — When the reply ControlId does not match the ControlId of the original document, log a warning but treat the document as Completed OK.
*=S,~=S — In all other cases, including when replies that do not contain a TA1, AK5 or AK9 segment, suspend the document, log an error, and move on to try the next document.
A string of separator characters which Ensemble assigns to X12 separators in left to right order as described below.
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).
An X12 document uses special characters to organize its raw contents. These characters may vary from one clinical application to another. For non-empty values of Separators, positions 1 through 3 (left to right) are interpreted as follows:
Data Element Separator (ES)
Component Separator (CS)
Data Element Repeat Separator (RS)
The default values for positions 1 through 3 are:
\a (record separator)
For Separators, you must supply a string of three characters which Ensemble 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.
Any non-empty string triggers basic validation of the outgoing document. If the Validation field is left empty, no validation of the outgoing document is performed.