Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 03 Aug 2009 @ 20:38:57 GMT


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


Subj:   Error Handling in BTEQ Export
 
From:   Varun Kore

Hi,

I export variables into files using bteq export. I would like to know how to include error handling into this i.e. when the "rm" command tries to remove the file but is unable to do so due to improper permissions, I want the Bteq to come out and throw an error which I can catch in unix.

I tried using 'ERRORCODE' but it did not work. Any ideas will be helpfull.

     bteq< 0 THEN .QUIT 25;

     .EXPORT REPORT FILE=./XLIST/curr_exec_id.dat;

     .IF ERRORCODE <> 0 THEN .QUIT 25;

     SELECT current_date;

     .IF ERRORCODE <> 0 THEN .QUIT 25;

     .EXPORT RESET;

     .IF ERRORCODE <> 0 THEN .QUIT 25;

     .quit

     .exit

     !

Thanks and Regards

Varun Kore,
Associate System Engineer



     
  <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