IBM supplies you with the sample compiler user exit, IBMUEXIT, which filters messages for you. It monitors messages and, based on the message number that you specify, suppresses the message or changes the severity of the message.
There are several files that comprise IBMUEXIT:
On Windows:
pli ibmuexit ilib /geni ibmuexit.def ilink /dll ibmuexit.obj ibmuexit.exp
The PLI source file is provided for your information and modification. The INF control file contains the message numbers that should be monitored, and tells IBMUEXIT what actions to take for them. The executable module reads the INF control file, and either ignores the message or changes its severity.