hmmm, nice FAQ there Les ... just one comment though ... you used a simple example through-out your discussion, then at the end of it (your last example), you kinda re-worked the whole thing and threw in a UDF and kinda obscured the whole thing. Just my opinion. two cents ... thought just showing the original sample with EXIT 0 would have been clearer.