Application Error when BTEQ Exits (Windows)

Tools
Enthusiast

Application Error when BTEQ Exits (Windows)

I get the following Application Error after exiting BTEQ in cases where I the script passed to BTEQ has lots of steps (mostly .run commands). I have tried some testing with just a few commands in the script and don't encounter the problem.

This appears in a Windows dialog box:

|----------------------------------------------------------------------
|bteq.exe - Application Error
|----------------------------------------------------------------------
|The instruction at "0x1000c5a7" referenced memory at "0x695f7461".
|The memory could not be "read".
|
|Click on OK to terminate the program

When I look at the log file, I show that the last step was processed fine:

<--------------------------------------------------------------------->
.
.
.
*** get end timestamp
SELECT CAST(CURRENT_TIMESTAMP AS VARCHAR(23)) AS End_Process_DT;

*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.

End_Process_DT
-----------------------
2007-01-12 05:18:34.370

+---------+---------+---------+---------+---------+---------+---------+----

.logoff
*** You are now logged off from the DBC.
+---------+---------+---------+---------+---------+---------+---------+----
*** Warning: EOF on INPUT stream.
*** BTEQ exiting due to EOF on stdin.

*** Exiting...
<--------------------------------------------------------------------->

This is causing a problem because the bteq step is part of a larger process which stops at this point until someone responds to the Windows dialog box.

Has anyone seen this before? Anyone know of a fix?

Thanks,

James