Ah, I'm sorry. I so much wanted a positive answer that I misread your post as that you know of a method.
Only idea I had so far was to make a rexx program that would recognize variables and map them to error handling module. Just to save some time on coding.