Standard-Specific Validation Checks
This topic provides information about validation checks that MapForce performs for different EDI standards. For details, see the subsections below.
Validation checks for UN/EDIFACT
Depending on whether a UN/EDIFACT message is standard or interactive, MapForce performs different validation checks.
Standard EDIFACT messages
When validating standard UN/EDIFACT documents, MapForce checks the following:
•If UNB and UNZ segments exist
•If UNB/S004 contains a valid date/time specification
•If UNB/0020 and UNZ/0020 contain the same value
•If UNZ/0036 contains the correct number, which is defined as the number of functional groups or the number of messages. If there are functional groups, this should be the number of functional groups; otherwise, it should be the number of messages in the interchange.
Functional groups
For each functional group, MapForce checks the following:
•If the functional group contains a matching UNG and UNE pair
•If UNG/S004 contains a valid date/time specification
•If UNE/0060 contains the correct number of messages
Messages
For each message, MapForce checks the following:
•If the message contains a matching UNH and UNT pair
•If UNH/S009/0052 has the same value as UNG/S008/0052 of the enclosing functional group
•If UNH/0062 and UNT/0062 have the same value
•If UNH/S009/0065 contains the correct message type specifier
•If UNT/0074 contains the correct number of segments
Interactive EDIFACT messages
The following validation rules apply to components with interactive EDIFACT messages:
•If UIB is present, then all subsequent UIH/S302 segments must match UIB/S302.
•UIH/S306/F0065 must contain a message type (validated by the parser).
•UIH/S306/F0052 must contain the message version number that is defined in the selected configuration files.
•UIH/S306/F0054 must contain the message release number that is defined in the selected configuration files.
•If present, UIT/F0340 must match the corresponding UIH/F0340 message header/trailer (optional field).
•If present, UIT/F0074 must contain the segment count (optional field).
•If present, UIZ/S302 must match UIB/S302 (optional composite).
•If present, UIZ/F0036 must contain the message count (optional field).
Validation checks for ASC X12
When validating ASC X12 documents, MapForce performs the following checks:
•If ISA and IEA segments exist
•If ISA/I01 contains a legal authorization information qualifier
•If ISA/I03 contains a legal security information qualifier
•If ISA/I05 segments contain legal interchange ID qualifiers
•If ISA/I08 contains a well-formed date value
•If ISA/I09 contains a well-formed time value
•If ISA/I13 contains a legal Boolean value
•If ISA/I14 contains a legal interchange usage indicator
•If ISA/I12 and IEA/I12 contain the same value
•If IEA/I16 contains the correct number of function groups in the interchange
Functional groups
For each functional group, MapForce checks the following:
•If there is a matching GS and GE pair
•If GS/373 contains a well-formed date value
•If GS/337 contains a well-formed time value
•If GS/28 and GE/28 contain the same value
•If GE/97 contains the correct number of messages in the functional group
Messages
For each message, MapForce checks the following:
•If there is a matching ST and SE pair
•If ST/143 contains the correct message identifier
•If ST/329 and SE/329 contain the same value
•If SE/96 contains the correct number of segments in the message
Validation checks for HIPAA X12
HIPAA components are similar to ordinary ANSI X12 components. Validation checks are performed in the same way as for X12 components (see subsection above). The differences from standard X12 messages are described below:
•MapForce automatically maintains the hierarchy of HL segments.
•MapForce supports the so-called floating structures (in 837 messages).
•MapForce auto-completes and validates more fields.
Validation checks for NCPDP SCRIPT
With respect to NCPDP SCRIPT messages, MapForce performs the following validation checks:
•UIB/S001/F0001 must be UNOA.
•UIB/S001/F0002 must be 0.
•UIH/S306/F0329 must contain the message type SCRIPT.
•UIH/S306/F0316 must contain the message version number that is defined in the selected configuration files.
•UIH/S306/F0318 must contain the message release number that is defined in the selected configuration files.
•UIH/S306/F0326 must contain the message function (or the message type in MapForce terminology).
•If present, UIT/F0062 must match to the corresponding UIH/F0062 segment.
•If present, UIT/F0074 must contain the segment count.
•If present, UIZ/F0036 must contain the message count.
TRADACOMS
When you run a mapping that reads data from or writes data to a TRADACOMS structure, MapForce performs structural data validation checks according to the TRADACOMS specification, and displays any validation errors in the Messages window.
The following factors determine how MapForce validates the parsed or generated TRADACOMS files:
•The validation constraints defined in the configuration files available in the MapForce installation folder (subfolder MapForceEDI\TRADACOMS). These configuration files supply, on one hand, the default validation rules of the TRADACOMS specification. On the other hand, they provide the means to adapt the TRADACOMS format to custom requirements. In particular, it is possible to modify the data elements, segments, or code values defined in the configuration files, and thus influence both the outcome of validation and the mapping execution.
•The validation logic built into MapForce. This includes MapForce internal data integrity checks that may not be enforced by means of configuration files.
•Any custom validation settings that you have defined from the MapForce graphical user interface (see EDI component validation ). To view or change the current EDI validation settings of any EDI component, including TRADACOMS, double-click the header of the component, and then click Validation in the Component Settings dialog box.
When writing to a TRADACOMS structure, MapForce automatically fills in the contents of those data elements for which the value can be calculated or is predefined. This is referred to as ""auto-completion". To disable this behavior, clear the Auto-complete missing fields check box from the Component Settings dialog box (see EDI Component Settings).
The following TRADACOMS validation rules cause MapForce to raise validation errors (during file parsing or generation) or to auto-complete missing fields (during file generation):
1.The segments STX (Start of Transmission) and END (End of Transmission) must exist.
2.If STDS-1 has the value 'ANAA' then a Reconciliation Message (RSGRSG) must exist before the end of transmission (END). Otherwise, no Reconciliation Message (RSGRSG) must be present.
3.If STDS-1 has the value 'ANAA' then:
a.The value of RSGA in the Reconciliation Message must be equal to the value of SNRF in the STX segment
b.The value of RSGB in the Reconciliation Message must be equal to the value of UNTO-1 in the STX segment.
4.TRDT-1 must contain the date (YYMMDD) and TRDT-2 must contain the time (HHMMSS) of transmission (current date and time).
5.If the Batch Header (BAT) is present then the Batch Trailer (EOB) must also be present, and the number of messages in the batch must be available in the NOLI (Number of Messages in Batch) data element.
6.The MSRF (Message Reference) data element in the Message Header (MHD) must contain the consecutive count of messages within the transmission, starting with 1.
7.The NOSG (Number of Segments in Message) data element in the Message Trailer (MTR) must contain the number of segments, including MHD and MTR.
8.When present, the Reconciliation Message (RSGRSG) must consist of one segment (RSG), apart from the Message Header and the Message Trailer.
9.The NMST (Number of Messages in Transmission) data element in the END segment must contain the number of messages in interchange (count of MHD segments).
10.In general, when reading a TRADACOMS structure, MapForce expects that the interchange environment is of type "computer to computer" (or, in TRADACOMS terminology, "intelligent terminal to intelligent terminal"). Therefore, a segment such as MHD = 12 + ORDHDR :3 would trigger a validation error, since it contains extra leading and trailing spaces.
11.String data must be in upper case. When generating TRADACOMS output, MapForce converts string data to upper case.