Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 19 Jan 2005 @ 17:56:11 GMT


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


Subj:   Re: BTEQ OS Command Failures
 
From:   Muthusamy, Sudha

Prasanna

Here is a sample script ,

I am not sure if we can capture the OS command failures 'coz it is always listed as warnings and not errors

But you can use .set errorout stdout and find out if your OS command has been processed or failed

Hope this helps

Thanks

Sudha


sample.sh
--------------

     bteq << EOF
     .run file=$HOME/.tdlogon
     .set errorout stdout
     .set echoreq on
     .os rm s1.csv
     .quit
     EOF

Here is the log file

     BTEQ 08.02.00.00 Wed Jan 19 11:46:46 2005

     +---------+---------+---------+---------+---------+----

     .run file=/prod/users/uXXXXX/.tdlogon
     +---------+---------+---------+---------+---------+----
     .logon oneview/uXXXXX,

      *** Logon successfully completed.
      *** Transaction Semantics are BTET.
      *** Character Set Name is 'ASCII'.

      *** Total elapsed time was 1 second.

     +---------+---------+---------+---------+---------+----
     +---------+---------+---------+---------+---------+----
     .set errorout stdout
      *** Error messages now directed to STDOUT.
     +---------+---------+---------+---------+---------+----
     .set echoreq on
     +---------+---------+---------+---------+---------+----
     .os rm s1.csv
      *** Warning: System call failed.
     +---------+---------+---------+---------+---------+----
     .quit
      *** You are now logged off from the DBC.
      *** Exiting BTEQ...
      *** RC (return code) = 0


     
  <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