Warning: EOF On Input Stream

Database
Enthusiast

Warning: EOF On Input Stream

Hi All,

I was trying to run bteq with below code.

.RUN FILE='C:\Users\dell\Desktop\Cust_BteqScript.txt';'

Cust_BteqScript.txt contains below text and  Login.txt contains Login information

.RUN FILE='C:\Users\dell\Desktop\Logon.txt';

Insert into Tbl1 Select col1 from Tbl2;

.quit

However after the execution of the Cust_BteqScript.txt file  ,I am getting an error that "Warning: EOF on INPUT stream".The next INSERT part is not executing.Can someone help me with this?

Thanks,

Ashok.

4 REPLIES
Junior Supporter

Re: Warning: EOF On Input Stream

Enthusiast

Re: Warning: EOF On Input Stream

Hi Carlos,

I am not sure what is causing this error.I doubt if the cursor is returning back to main script Cust_BteqScript.txt after the excution of logon file.The below script is not executing "INSEERT INTO TBL1 SELECT COL1 FROM TBL2;".Can you please have a look at it.I am posting the script and Log below:

Caller SQL:

.RUN FILE=C:\Documents and Settings\copentaa\Desktop\Core Scripts\LOGON\LOGON_EDW.txt;

 Insert into Tbl1 Select col1 from Tbl2;

.LOGOFF

.QUIT

Called SQL:

.LOGON 10.25.5.93/COASH,******;

LOG:

-----

.run file=.RUN FILE='C:\Users\dell\Desktop\Cust_BteqScript.txt;

Teradata BTEQ 12.00.00.01 for WIN32. Enter your logon or BTEQ command:

.RUN FILE=C:\Documents and Settings\copentaa\Desktop\Core Scripts\LOGON\LOGON_EDW.txt;

 Teradata BTEQ 12.00.00.01 for WIN32. Enter your logon or BTEQ command:

.LOGON 10.25.5.93/COASH,

 *** Logon successfully completed.

 *** Teradata Database Release is 13.10.01.01                  

 *** Teradata Database Version is 13.10.01.01a                   

 *** Transaction Semantics are BTET.

 *** Character Set Name is 'ASCII'.

 *** Total elapsed time was 1 second.

 BTEQ -- Enter your DBC/SQL request or BTEQ command:

 *** Warning: EOF on INPUT stream.

 BTEQ -- Enter your DBC/SQL request or BTEQ command:

Thanks,

Ashok.

Enthusiast

Re: Warning: EOF On Input Stream

Hi All,

Can anyone help me with this please?

Thanks,

Ashok.

Junior Supporter

Re: Warning: EOF On Input Stream

Here is an example:

 BTEQ -- Enter your SQL request or BTEQ command:

CREATE SET TABLE MY_DB.PRUEBA01 (ID_N INTEGER NOT NULL,

                                 C_TXT VARCHAR(25) NOT NULL)

UNIQUE PRIMARY INDEX PRUEBA01_UPI(ID_N)

;

 *** Table has been created.

 *** Total elapsed time was 1 second.

File CALLER.btq:

.RUN FILE conexion;

INSERT INTO MY_DB.PRUEBA01 (ID_N, C_TXT) VALUES (0,'Caller');

.RUN FILE CALLED1.btq;

.QUIT ERRORCODE

File CALLED1.btq:

INSERT INTO MY_DB.PRUEBA01 (ID_N, C_TXT) VALUES (1,'Called1');

.RUN FILE CALLED2.btq;

File CALLED2.btq:

INSERT INTO MY_DB.PRUEBA01 (ID_N, C_TXT) VALUES (2,'Called2');

Execution:

C:\Process>bteq < CALLER.btq

BTEQ 13.10.00.01 Mon Oct 31 10:48:11 2011

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

.RUN FILE conexion;

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

.logon my_db/my_user,

 *** Logon successfully completed.

 *** Teradata Database Release is 12.00.02.46

 *** Teradata Database Version is 12.00.02.46

 *** Transaction Semantics are BTET.

 *** Session Character Set Name is 'ASCII'.

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

 *** Warning: EOF on INPUT stream.

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

INSERT INTO MY_DB.PRUEBA01 (ID_N, C_TXT) VALUES (0,'Caller');

 *** Insert completed. One row added.

 *** Total elapsed time was 1 second.

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

.RUN FILE CALLED1.btq;

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

INSERT INTO MY_DB.PRUEBA01 (ID_N, C_TXT) VALUES (1,'Called1');

 *** Insert completed. One row added.

 *** Total elapsed time was 1 second.

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

.RUN FILE CALLED2.btq;

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

INSERT INTO MY_DB.PRUEBA01 (ID_N, C_TXT) VALUES (2,'Called2');

 *** Insert completed. One row added.

 *** Total elapsed time was 1 second.

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

 *** Warning: EOF on INPUT stream.

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

.QUIT ERRORCODE

 *** You are now logged off from the DBC.

 *** Exiting BTEQ...

 *** RC (return code) = 0

C:\Process>

Results:

 BTEQ -- Enter your SQL request or BTEQ command:

SELECT * FROM  MY_DB.PRUEBA01;

 *** Query completed. 3 rows found. 2 columns returned.

 *** Total elapsed time was 1 second.

       ID_N  C_TXT

-----------  -------------------------

          2  Called2

          1  Called1

          0  Caller

HTH.

Cheers.

Carlos.