|
Archives of the TeradataForumMessage Posted: Wed, 19 Jan 2005 @ 17:56:11 GMT
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
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||