Saving headers with user-defined metadata

After the messages are split, they can be translated. The segments that were stripped off, the ISA and possibly GS, could be required later. They are stored in the user-defined metadata of each split message. These segments are stored as a keyed list whose value is the list of elements. The user-defined metadata of each message that is generated by splitX12 contains an ISA and possibly a GS. This depends on whether it was a group- or transaction-level split.

This makes the ISA and GS header fields available to procedures later on. To retrieve them:

set user_data [msgmetaget $mh USERDATA]
set isa_data [keylget user_data ISA]
set isa01 [lindex $isa_data 1]