For starters
- In the init of the session class: SET TALK OFF
- do one replace on the same record, not three
- use integers instead of chars ( LOWER(ALLTRIM(m.tcWay)) = "lower") )
- if append+replace is done many times, use insert instead
You'll need the coverage profiler, message#
568530 may help
Gregory