Ahh okay thanks Glenn. I'm pretty sure you have to set the @ERROR using 'EXIT x', how do you set the @SERROR? i'll have to wander through the documentation.