SQL message concepts

SQL messages are displayed when DB2® for i returns an error or warning code to the application that uses it.

To find a specific message, SQLCODE, or SQLSTATE, try the SQL message finder.

Use Display Message Description (DSPMSGD) to display a message description

Detailed descriptions of all DB2 for i messages, including SQLCODEs, are available in message file QSQLMSG. You can display and print them from the Display Message Description display. The CL command to display the message description is DSPMSGD. This command shows you both the first level and the second level text for the message. The first level is a short, single sentence version of the message. The second level generally describes the reason in more detail and provides suggested solutions.

To show the message that corresponds to SQLCODE 0204, type the following command:
DSPMSGD RANGE(SQL0204) MSGF(QSYS/QSQLMSG)