modify to catch TeradataError to avoid ruby callstack on error. returns 0 if exits normally. returns 1 if error occurs