Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you send an BTEQ abort msg to your JCL

Status
Not open for further replies.

Rmayott

Programmer
May 4, 2004
2
US
I need to send an abort code to my JCL from a SQL script used in a Teradata Data Warehouse application so the condition code is not '000' in order to alert the submitter that the job did not complete normally. Is there a BTEQ command to accomplish this or any other way of doing it?

Thanks
 
Have you tried to use such as example:
___________________________________________
insert database.table
(
CustID,
...
)
SELECT
CustID
...
FROM TEMP;

.IF ERRORCODE > 0 THEN .QUIT 12
_____________________________________
and catch the errorcode in your JCL

regards
Francois
 
Thanks Goryn. John Hall suggested the same approach and it worked well.

Thanks for responding.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top