BTEQ log generatin with in the BTEQ script using .run file

Database
Enthusiast

BTEQ log generatin with in the BTEQ script using .run file

Hi Guys,

 

Need some quick help on the below scinario.

 

I have a requirement where i have to route the log to a file with in the BTEQ scripts .

 

.run file = will logon to bteq 

 

creating a volatile table with data ;

 

.run file = insert.txt >> will be using the volatile table create above this step and would like to log the output to a file (will be running on unix system)

.run file =  insert.txt >> will be using the volatile table create above this step and would like to log the output to a file (will be running on unix system)

 

.logoff;

 

Regards

 

2 REPLIES
Enthusiast

Re: BTEQ log generatin with in the BTEQ script using .run file

got the solution 

 

..MESSAGEOUT FILE = file path 

Teradata Employee

Re: BTEQ log generatin with in the BTEQ script using .run file

Hi. In case it matters for your efforts... In BTEQ's 16.20.00.04 version a RESET option has been added to the MESSAGEOUT command. This option causes BTEQ to restore the standard output back to the original stdout/SYSPRINT stream, which could be a terminal screen, a redirected file, a pipe, or some other device. It appears you are talking about a batch mode use case. But for completeness here, error handling was also improved so that if a MESSAGEOUT command fails during interactive mode, BTEQ will preserve the previous MESSAGEOUT state without terminating.