BTEQ: maxerror 1 - .run vs. .compile

Tools
N/A

BTEQ: maxerror 1 - .run vs. .compile

Hey,

BTEQ throws error when session parameter maxerror is set to 1 and SQL script is executed with .run file,

it doesn't throw error when SQL script is executed with .compile file

Is there any hack for that?

Thanks in advance :-)

Michal

2 REPLIES
N/A

Re: BTEQ: maxerror 1 - .run vs. .compile

.compile file option doesn't even raise errorlevel, even if there are errors in procedure definition,

I can't find any way to catch it's errors

.if errorlevel > 0 doesn't work either

N/A

Re: BTEQ: maxerror 1 - .run vs. .compile

Sooooo, there is solution, but a "bit" desperate.

We can save BTEQ output to file and search it for SPL errors right after running BTEQ with .compile file option.

We must deal with syncing saving of log file and searching for errors.