All Forums Tools
Jaguar 25 posts Joined 05/06
11 May 2006
Invoke Teradata BTEQ/MLOAD scripts from unix shell script

Hi , I need to invoke Bteq/Mload scripts from a unix shell script to fetch data from Teradata database.Can someone help we that?Thanks

TDUser-781 35 posts Joined 12/04
11 May 2006

In your shell script you can use the same commends you use in windows environment:betq < the ctl filename >> the log filenamehope this helps,bye,TDUser

Jaguar 25 posts Joined 05/06
12 May 2006

Hi TDUser, Appreciate your help..It works..However I am facing another problem.I am redirecting the output of btq to a log file.But the log file only captures the return code.I wish to capture the actual Teradata Failure message as well.For e.g I get the following error "*** Failure 3706 Syntax error: expected something between the beginning of" on my screen.However the same error does not get re-directed to a log file.Is it possible to capture the failure message in a log file?Thanks againRegardsRennie

DGiabbai 47 posts Joined 07/04
12 May 2006

Just add this BTEQ statement before the "logon":.SET ERROROUT STDOUT

You must sign in to leave a comment.