All Forums Tools
Musomasu 3 posts Joined 10/04
11 Apr 2006
Help required BTEQ IMPORT

Hi
i am trying to import a file using BTEQ here are the file details and script. when i try to import it is giving error.

params.txt
1

script.
.LOGON demotdat/dbc,123;
.import data file=params.txt;
using eno(char(1)) sel * from smk.emp where emp_no=:eno;
.LOGOFF;
.QUIT;


error
*** Growing Buffer to 3377
*** Error: Import data size does not agree with byte length.
The cause may be:
1) IMPORT DATA vs. IMPORT REPORT
2) incorrect incoming data
3) import file has reached end-of-file.
*** Warning: Out of data.

can iknow what should be the reason for this.

Thanks

TDUser-781 35 posts Joined 12/04
11 Apr 2006

Hi Musomasu,
try defining fornmat for you input file....

if I were you I would define format vartext and declare eno variable as VARCHAR(1).

Hope this helps,
Bye,
TDUser

Musomasu 3 posts Joined 10/04
12 Apr 2006

Hi
i Tried with vartext and worked fine.

params.txt
1

script.
.LOGON demotdat/dbc,123;
.import vartext file=params.txt;
using eno(varchar(1)) sel * from abc.emp where emp_no=:eno;
.LOGOFF;
.QUIT;


can we use the variable eno in more than one query.

i mean

.LOGON demotdat/dbc,123;
.import vartext file=params.txt;
using eno(varchar(1)) sel * from abc.emp where emp_no=:eno;
using eno(varchar(1)) sel * from abc.manager where emp_no=:eno;
.LOGOFF;
.QUIT;

when i use the second query it is giving error.

can anybody let me know how to rectify this issue.is there any alternate way to do this.

Thanks

dnoeth 683 posts Joined 11/04
12 Apr 2006

Hi Musomasu
just use a multistatement:

.LOGON demotdat/dbc,123;
.import vartext file=params.txt;
using eno(varchar(1)) sel * from abc.emp where emp_no=:eno
;using eno(varchar(1)) sel * from abc.manager where emp_no=:eno;
.LOGOFF;
.QUIT;

Dieter

Musomasu 3 posts Joined 10/04
12 Apr 2006

Hi Deiter

Thanks for the Help,it works fine.

thanks


You must sign in to leave a comment.