I think, the best way is to create a table with retcodes and meanings.