Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 04 Aug 2009 @ 00:18:17 GMT


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


Subj:   Re: Error Handling in BTEQ Export
 
From:   Vinay Bagare

Varun,

A better way could be...

     retcode=0
     rm -f /tmp/outfile.txt > /dev/null 2>&1
     retcode=$?

     if [ $retcode -gt 0 ]; then
             echo "Error while Deleteing file"
             echo "Exiting...with return code $retcode"
             exit $retcode
     fi

     # Else Continue w/ BTEQ Job
     bteq < dbacpu.log
     .run file logon.txt

     .export report file /tmp/outfile.txt

     sel databasename
     from dbc.databases;
     .export reset

     .logoff
     .quit

     EOF

Thanks,

Vinay Bagare



     
  <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