Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 20 May 2008 @ 19:40:36 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Grabbing the Return code
 
From:   David Clough

Hi,

We (at TNT) would like to be able to run Teradata DDL in Bteq and write to a log table with any unsuccessful completion codes (along with the DDL statement itself). We were thinking about executing a Macro that would write to a log table after every DDL statement, but we don't think it's possible to retrieve the actual Return code.

We're aware that we can test against a specific code in Bteq but we don't think we can grab the return code and subsequently pass it into the Macro.

The only way I can think of it is to construct a Stored Procedure which would accept a statement and then run that statement as dynamic sql. I think I could then get access to the return code. If need be, I'll do that but it seems a touch over-engineered ... actually, as I'm writing this, I'm warming to the idea.

Equivalently, I could use a scripting language (such as Python) to do the job but I'd rather stay within the Teradata toolset whilst running the DDL.

Anyway, has anyone got any other ideas on how to resolve this situation ?

I'm sure there must be many people that do a similar thing.


Regards,

Dave Clough
Database Designer
Express ICS



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023