Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

IMPORT: can't define MESSAGES file

$
0
0
DB2 9.7 LUW.

I have a stored proc that does multiple import statements that import data from CSV files into tables. When I run the proc, the statements in the beginning of the proc work fine. This import statement in the middle...

Code:

CALL SYSPROC.ADMIN_CMD('IMPORT FROM /home/db2inst1/SRS2013IMPORT/DataValueType.csv OF DEL modified by coldel; METHOD P (1, 2, 3, 4, 5, 6, 7) SKIPCOUNT 1 INSERT INTO SRS_IMPORT.DATAVALUETYPE_IMPORT(DataValueTypeId, DataValueTypeNK, DataValueTypeName, UnitNK, DataCategoryName, AggregationMethodName, IsLocked)');
... seems to import its data correctly but still gives a warning,

Quote:

IWAQ0003W SQL warnings were found
SQLState= There is at least one warning message in the message file.. SQLCODE=3107, SQLSTATE= , DRIVER=4.14.113
This warning makes the proc ignore the rest of the import statements.

In order fix the above, I need to read what the message file says so to I tried to add a MESSAGES file to the command:

Code:

CALL SYSPROC.ADMIN_CMD('IMPORT FROM /home/db2inst1/SRS2013IMPORT/DataValueType.csv OF DEL modified by coldel; METHOD P (1, 2, 3, 4, 5, 6, 7) SKIPCOUNT 1 MESSAGES import.msg INSERT INTO SRS_IMPORT.DATAVALUETYPE_IMPORT(DataValueTypeId, DataValueTypeNK, DataValueTypeName, UnitNK, DataCategoryName, AggregationMethodName, IsLocked)');
But then db2 complains:

Quote:

An unexpected token "import.msg" was found following "MESSAGES". Expected tokens may include: "ON".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.14.113
I have tried with
MESSAGES import.msg
MESSAGES "import.msg"
MESSAGES \"import.msg\"

but always get the same "unexpected token" error. What should I do to be able to know what DB2 is warning me about in the import - or is there some way that I can get the rest of the import operations to run regardless of the warning?

Viewing all articles
Browse latest Browse all 13329

Trending Articles