Question & Answer
Question
[
If you are running a DB2® Command Line Processor (CLP) script within DB2 Connect™ against a DB2 for OS/390® (or DB2 for z/OS®) server, you might receive an SQL0965W message: "There is no message text corresponding to SQL warning "<SQLCODE>" in the message file on this workstation. The warning was returned from module "<name>" with original tokens " <token-list>"".
]Cause
This would happen if the message that comes back from the host is a positive return code (a warning), and that message is not mapped to a message in DB2 Connect.
You may want to disable this warning so that the DB2 CLP script is not interrupted part way through its run.
Answer
DB2 Connect has a way to customize the mapping of error messages that come from a host database. The default map file is called dcs1dsn.map and resides in the sqllib/map directory on the DB2 Connect server.
You can add a line to the map file, to map the unrecognizable warning to "+000", so that DB2 Connect would not display a warning for that error.
For example, assume the following index was being created on a table as follows:
DB2 CREATE UNIQUE INDEX s1ind ON s1(c1) DEFINE NO;
If there is data already in the table, then you may receive the following message from the DB2 for OS/390 server:
SQL0965W There is no message text corresponding to SQL warning "20122"
in the message file on this workstation. The warning was returned from module "DSNXICX2" with original tokens "". SQLSTATE=01644
Modify the sample map file (sqllib/map/dcs1dsn.map) by adding the following line to the top of the file (beneath the first line that reads: "&&"):
+20122 , +000, (s)
Save the modified file, and use that file when cataloging the "dcs database" within the dcs database directory. You can either use the Configuration Assistant to modify the dcs database entry, or use the following commands:
DB2 UNCATALOG DCS DATABASE <database-name>
DB2 CATALOG DCS DATABASE <database-name> AS <target-database> PARMS '<path/map-file>,,,,,,,,'
DB2 TERMINATE
The +965W warning for that specific message (+20122) will not be generated by DB2 Connect for that database thereafter.
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21215596