Archives of the TeradataForum
Message Posted: Fri, 08 Jan 2005 @ 04:12:19 GMT
if any of the SQL statements in the JOB fail when the job exits.
BTEQ will return an 8.
It could be as simple as a
drop table blort; *** Failure 3807 Object 'blort' does not exist. create table blort .....
which is pretty standard SQL for a script to drop the table before it creates it.
even if the LAST statement succeeds somewhere in BTEQ this RETCODE is laying around remembering that something in the script failed and it gets output when you exit.
.logon mybox/user password sel count(*) from dbc.errormessags; *** Failure 3807 Object 'dbc.errormessags' does not exist. Statement# 1, Info =0 *** Total elapsed time was 1 second. BTEQ -- Enter your DBC/SQL request or BTEQ command: sel count(*) from dbc.errormsgs; sel count(*) from dbc.errormsgs; *** Query completed. One row found. One column returned. *** Total elapsed time was 1 second. Count(*) ----------- 2473 BTEQ -- Enter your DBC/SQL request or BTEQ command: .logoff .logoff *** You are now logged off from the DBC. Teradata BTEQ 08.02.01.00 for UNIX5. Enter your logon or BTEQ command: .quit; .quit; *** Exiting BTEQ... *** RC (return code) = 8
If you run the above script without the failure you will get a '0' return code.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|