BTEQ Import REPORT Mode. Growing to buffer

Tools & Utilities
Enthusiast

BTEQ Import REPORT Mode. Growing to buffer

Hello All,

When i try to import the fixed length data. The data is growing to buffer to 65473 and getting imported to the table. The problem is in the USING part. But not able to figure how to overcome it.

Plz experts help me with this issue

Import Script:

.LOGON 127.0.0.1/jugal,jugal

.IMPORT REPORT FILE=/root/jugal/samples12

.QUIET ON

.REPEAT *

USING

EmpId (INTEGER),

EmpName (CHAR(5)).

DeptId (INTEGER)

INS INTO jugal.NewTable1 values (:EmpId,:Empname,:DeptId);

.LOGOFF

samples12.txt

10 Jugal 100

20 Jugal 200

30 Anil 300

Source Table:

CREATE TABLE jugal.NewTable1

(EmpId INT,

EmpName CHAR(10),

DeptId VARCHAR(10)

);

2 REPLIES
Junior Contributor

Re: BTEQ Import REPORT Mode. Growing to buffer

You're importing in REPORT mode which expects fixed width CHARs, but your data is VARCHAR and your USING includes binary integers.

Try

.IMPORT VARTEXT ' ' FILE=/root/jugal/samples12;
.QUIET ON
.REPEAT *
USING
EmpId (VARCHAR(11)),
EmpName (VARCHAR(10)).
DeptId (VARCHAR(1))
INS INTO jugal.NewTable1 values (:EmpId,:Empname,:DeptId);
Enthusiast

Re: BTEQ Import REPORT Mode. Growing to buffer

THanks Dnoeth.. :).. Now the code is working fine..