Re: How to capture the rejected rows from BTEQ.IMPORT
Q: Is there anyway to capture those rejected rows and write into another file ?
A: No, sorry, not with BTEQ. If you have to capture the rejected rows, you'll have to use one of the load utilities (i.e., FastLoad; MultiLoad; TPump; or the corresponding TPT operators, Load, Update, or Stream). The rejected rows (or, in some cases, just the input file number and record number) will be captured in error table(s).
As enjoycoding stated, .SET REPEATSTOP ON will abort the REPEAT at the first error, but it doesn't sound like that's what you want.
Of course, the ultimate answer is to clean up the incoming data (I realize that you may not have control over that, but in the long run that's the most efficient approach).