Encountering error while using .EXPORT REPORT FILE command in BTEQ

Tools
N/A

Encountering error while using .EXPORT REPORT FILE command in BTEQ

Hello Everyone,

I have written the following code to extract data to a file

LOGON -------;
DATABASE ---- ;
SET ERROROUT STDOUT;
SET WIDTH 500;
SET ECHOREQ OFF;
SET TITLEDASHES OFF;
EXPORT REPORT FILE="/werr1/we1s/ws/ABX_log";
select * from DBC.Tables;
EXPORT RESET
LOGOFF;
QUIT ;

I am getting an error

*** Error: Open failed because: No such file or directory

Can someone help me out?

Thanks
1 REPLY

Re: Encountering error while using .EXPORT REPORT FILE command in BTEQ

Hi,
the only think to suggest is that some subdirectory from
/werr1/we1s/ws/ABX_log
does not exist.
The Code is Ok except, you must have received some Warnings such:
"*** Warning: Expected a '.' before the command"
from command bteq.
The folowing code doesn't make arnings:
.LOGON ----;

DATABASE ----;

.SET ERROROUT STDOUT;
.SET WIDTH 500;
.SET ECHOREQ OFF;
.SET TITLEDASHES OFF;
.EXPORT REPORT FILE="/werr1/we1s/ws/ABX_log";
select * from DBC.Tables where DatabaseName='mydb' AND TableKind='T';
.EXPORT RESET
.LOGOFF;
.QUIT ;

greeting
stami