This looks to me a shell scripting error. When you provide a bunch of statements through shell like this, make sure that the input bunch is properly read and submitted to bteq by your shell script.
When you say,
bteq << -EOF > blabla
your shell will scan the script till "-EOF" word and feed it to bteq. But if shell cannot determine what it has to provide, then it send no data, resulting bteq terminating with no error. BTEQ's behaviour is correct as it has nothing to execute.
Try the following in your script.
bteq << [EOF] > ${LogDir}/${Bteq_Log}
.SET SESSIONS 1;
.SET WIDTH 254;
.SET ERROROUT STDOUT;
.SET ERRORLEVEL (0, 2641) SEVERITY 0;
.SET ECHOREQ ON;
.SET RETCANCEL ON;
.SET RETLIMIT 20;
.run file=${MAIN_DIR}/logon_BTEQ_EIS.txt;
.IF ERRORCODE != 0 THEN .quit ERRORCODE;
...
.QUIT 0
[EOF]
Note that "[EOF]" is matched. Also, there is a newline after last "[EOF]".
Please post it to shell scripting forums if still getting the error. This is not a problem with bteq.
This looks to me a shell scripting error. When you provide a bunch of statements through shell like this, make sure that the input bunch is properly read and submitted to bteq by your shell script.
When you say,
your shell will scan the script till "-EOF" word and feed it to bteq. But if shell cannot determine what it has to provide, then it send no data, resulting bteq terminating with no error. BTEQ's behaviour is correct as it has nothing to execute.
Try the following in your script.
Note that "[EOF]" is matched. Also, there is a newline after last "[EOF]".
Please post it to shell scripting forums if still getting the error. This is not a problem with bteq.