File. The implementation acknowledgment can be
created from a subject document that is in a file. The file
can contain binary data in its raw form as long as it is properly
placed in the file according to the standard structure.
String. The data in the subject document can be
verified as a string. The string can consist of any character
and terminated by a NULL or zero character. The string
therefore cannot contain raw binary data because the zero characters
containing in it can terminate the string prematurely. Binary
data should be encoded first (for example, Base64
or Hexadecimal)
before feeding the string to FREDI. The entire string of the
EDI document can be loaded, or the data can be partially loaded a
sub string at a time. In both cases, FREDI actually saves the
data internally as a stream and then process the stream when the
entire string has been loaded.
Data in the document does not have to be correct because syntax and
implementation errors can be discovered during verification. FREDI
will attempt to report all other errors gracefully, but there may be
unexpected/unforeseen data errors that could force undefined behavior in
the program. Structured exception handling in the program should
be applied to handle such situations.
The following shows an actual ASC/X12 EDI document having the
following properties:
Data Element Terminator is * (asterisk)
Data Segment Terminator is ~CRLF (tilde followed by
carriage-return line-feed). The CRLF has been applied to
display the data segment separately for viewing, but in most cases
the CRLF is absent to make the document more compact.
The following shows an actual UN/EDFIACT EDI document having the
following properties:
Data Element Terminator is + (plus sign)
Data Segment Terminator is 'CRLF (quote followed by
carriage-return line-feed). The CRLF has been applied to display the
data segment separately for viewing, but in most cases the CRLF is
absent to make the document more compact.