I agree with Jim.
Sounds like either a bad message or bad end of line characters.
You’ll need to set your testing tool to use New Line or Length Encoded, per your message requirements.
If you are not sure about your end of line characters; I use notepad++ to show all characters, then under the edit menu “EOL Conversion” select “(CR)”. this will add a Carriage Return to the end of each line and a CRLF after the last line in the file – you’ll use “EOF Termination” in the testing tool.
Hope this helps…
Regarding your table lookup. If you only have 1 value to translate to, then just do an if statement in the xlate, else, if you have many values then use the lookup table.