Hello.

>>The ACKs will have MSH/MSA/ERR segments
Each that segment is a string with delimiters.
Function $piece can help you parse MSH/MSA/ERR.