Error Code 4 Solution required

Analytics

Error Code 4 Solution required

Hi i have written a script in bteq .

The queries execute fine but at the end the scripts exits with below error.

*** Warning: EOF on INPUT stream.|

*** BTEQ exiting due to EOF on stdin.|

*** Exiting BTEQ...|

*** RC (return code) = 4 |

How do I resolve this error.I have also tried adding :

.IF ERRORCODE=4 THEN .QUIT 0

Please help.

Tags (1)
2 REPLIES

Re: Error Code 4 Solution required

I am running this script through Ab initio.

Enthusiast

Re: Error Code 4 Solution required

Hi Vital

When we write Bteq in batch mode with in shell scripts we specify the half containing the Bteq commands

with the begining an ending of an identifer as shown below

Here eof is the identifier which conveys that all that between are bteq commands

bteq<<eof

.logon tdp_id/usrnm,passwd

select database;

select account;

select session;

.logoff

.quit

eof

now if you place second eof before you logff you may face the above warning this is because when teh second eof is reached the system thinks that we have reached the end of all the bteq commands though we havent logged off  legally

Hope this helps

Regards

Rajeev