If you use a function with just an "Exit 0" in it to clear the @ERROR, the @SERROR is reset automatically to "The command completed successfully". You can't "clear" it but you can reset both values to a success.

It's rarely (if ever) needed, as just about every function sets the exit status and the corresponding error macros. UDFs without explicit exit values (generally a bad practice) will default to success values.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D