hcix12test

This command tests X12 records. It handles X12 messages that contain:

  • An interchange (ISA..IEA)

    or

  • A single group (GS..GE)

    or

  • A single transaction set (ST..SE)

hcix12test accepts interchanges, groups, or transaction sets:

  • If the message starts with ST or GS, then it is treated as an individual transaction set or an individual group, respectively. For ST and GS messages, use default separator characters (*, ~ and \).
  • If the message does not start with ST or GS, then it is treated as an interchange. hcix12test handles a message with any number of interchanges, each containing any number of groups, which can contain any number of transaction sets. For interchanges, the separator characters are extracted from the ISA segments.
  • If using group messages, for example GS to GE, then create a variant that defines the transaction sets in terms of groups. Then, specify such a variant for the test. The path names for a group are different from the transaction set. The GS becomes group zero and the first ST is 1(0).0(0).ST(0).

Group-defined messages use this structure:

GS
{
          ST
          ...
          SE
}
GE

If an envelope is used, then it extracts the transaction sets and parses the individual transaction sets. If transaction sets are used, then hcix12test processes the message without extracting the transaction sets.

hcix12test [-a] [-d n] [-e encoding] [-i] [-f format] 
[-V version] [-v variant] [-t test] [-c drivercontrol] 
[-n] [-F fieldname] [-w search expression] [-p sepChars] 
file 
  • -a processes all records in the file.
  • -d n shows data at detail level n. The detail level range is 0-4, where 0 is raw, unparsed data and 4 is the most detailed.
  • -e encoding is the encoding name for the data file.
  • -i displays field addresses using index notation.
  • -f format specifies the file format:
    • -f len10 specifies 10-byte length-encoded.
    • -f nl specifies newline terminated. This is the default.
    • -f eof specifies end-of-file terminated.
  • -V version specifies the X12 version. The default is 003050.
  • -v variant specifies the X12 variant.
  • -t test specifies the test to run:
    • -t numbers tests Nn number conversions.
    • -t parse test parses a message. This is the default.
  • -c drivercontrol is set the content to message metadata DRIVERCONTROL.
  • -n shows the field names.
  • -F fieldname specifies the field name only.
  • -w search expression specifies the search string or regular expression for which to search.
  • -p sepChars are the separator characters used for parsing or encoding. This needs to be in a keyed list format.
  • file specifies the data file with which to test.