How to set BTEQ Import error records limit

Tools

How to set BTEQ Import error records limit

Hi All,

My problem is to check for any rows rejected from the source file. I have to quit with error if there are any records rejected.
My script and log is

.SET MAXERROR 0;
+---------+---------+---------+---------+---------+---------+---------+----

.IMPORT VARTEXT '~' FILE ./inprogress/somefile.txt
+---------+---------+---------+---------+---------+---------+---------+----

.REPEAT *
+---------+---------+---------+---------+---------+---------+---------+----
USING
(
col1 VARCHAR(100)
,col2 VARCHAR(100)
)
INSERT INTO
mytable
(
col1,col2
)
VALUES
(
:col1
,:col2
);
*** Starting Row 0 at Tue Mar 8 16:02:41 2011

*** Insert completed. One row added.
*** Total elapsed time was 1 second.

*** Failure 2673 The source parcel length does not match data that was defi
ned.
Statement# 1, Info =1
*** Total elapsed time was 1 second.

*** Insert completed. One row added.
*** Total elapsed time was 1 second.

*** Warning: Out of data.
*** Finished at input row 3 at Tue Mar 8 16:02:41 2011
*** Total number of statements: 3, Accepted : 2, Rejected : 1

*** Total elapsed time was 1 second.

*** Total requests sent to the DBC = 3
*** Successful requests per second = 3.000

+---------+---------+---------+---------+---------+---------+---------+----
.IF ERRORCODE <> 0 THEN .GOTO ERRORFOUND
+---------+---------+---------+---------+---------+---------+---------+----

Please help.
Thanks in advance
1 REPLY

Re: How to set BTEQ Import error records limit

.SET REPEATSTOP ON

Got it! This works. Thanks.