bcp Behavior Changes

Changes to bcp behavior in Open Client and Open Server Programmers Supplement > Utility Commands > bcp.

bcp does not insert any row that contains a noncharacter entry that exceeds the length of the corresponding target table column. For example, bcp does not insert a row when an input value of 65000 is supplied for a target table column of type smallint. Instead, bcp reports a conversion error and skips the row. Also, bcp does not insert truncated noncharacter data into the table. The conversion error is as follows:

cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow

To track data that violates noncharacter type length requirements, run bcp with the -e log-file name option. bcp records the row and the column number of the rejected data, the error message, and the data in the log file you specify.

bcp truncates and inserts any row that contains a character type entry that exceeds the length of the corresponding target table column. Although the same overflow message is raised as for noncharacter type overflows, an error file is not created.