IBM Support

SQL2912N may be returned in messages files of INGEST command if length definition is missing

Technical Blog Post


Abstract

SQL2912N may be returned in messages files of INGEST command if length definition is missing

Body

INGEST command can be used to import data from an input file or pipe into Db2 tables.

The following is a scenario that INGEST command returns 1 error:

SQL2901I  The ingest utility completed at timestamp "11/12/2017
13:19:01.762774". Number of errors: "1". Number of warnings: "0".    Message
file: "/home2/db2v105a/tmp/messages.txt".

 

Detailed error in the message file shows as follows:

SQL2912N  The ingest utility failed because one or more fields are binary type
but the length of those binary fields was not specified.
SQL2902I  The ingest utility completed at timestamp "11/12/2017
13:19:01.762774". Number of errors: "1". Number of warnings: "0".

 

The error indicates that the length definitions for one or more binary fields are missing.

For instance, a field has the following data type should use EXTERNAL(length) if reading from an ASCII output file:

INTEGER, SMALLINT, BIGINT, DECIMAL, FLOAT

Verify what fields are missing the length definitions in your INGEST command.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm11140322