DSNH messages

Message identifiers that begin with DSNH communicate information about the Db2 precompiler or the Db2 coprocessor.

References to the Db2 precompiler also apply to the Db2 coprocessor, unless otherwise mentioned. The Db2 coprocessor is invoked through the compiler.

Message line numbers

The line number nnnn in DSNH messages is generated by assigning sequential numbers to the original source. The numbers are printed on the SQL Db2 precompiler source listing (if the SOURCE option is specified to the precompiler). If you are using the Db2 coprocessor, the error messages and their line numbers, if applied, are printed on the compiler output listing. The line number points to the beginning of the SQL statement. The column number, if it can be determined, is a relative number from the beginning of the SQL statement that is in error.

'COL cc' in the messages identifies the source column in which the condition was detected. The indicated column, 'cc', usually specifies the location of the column that contains the first character of the associated source token. However, if the precompiler cannot determine this location, it is the beginning of the statement. Because the detected error might be similar to a valid, but different, construction, the SQL parsing might indicate the wrong location for the error.

DSNH message severity codes

To indicate the severity of the messages as an aid to programmers, each DSNH message includes one of the following letters at the beginning of message text.

Letter Reason code Meaning
I 0 Informational
W 4 Warning
E 8 Error
S 12 Severe error
U 16 Unrecoverable error

When unsupported non-Db2 statements are detected during SQL(ALL) precompilation and no host-related errors are detected, the return code is forced to 4 if it was 8. So, the application can proceed with the compilation and link-edit steps, and the syntax checks can be delayed until bind. If a severity 8 precompiler error message is not a host-related error, the precompiler treats it as a warning and places W instead of E in the precompiler output listing. The precompiler also issues DSNH049I to indicate that the return code 8 from the precompiler is changed to 4.

The following precompiler messages with severity levels of 8 are not changed from errors to warnings when SQL(ALL) is in effect:

  • DSNH051I
  • DSNH080I
  • DSNH290I
  • DSNH291I
  • DSNH292I
  • DSNH312I
  • DSNH313I
  • DSNH314I
  • DSNH504I

For more information about the SQL(ALL) precompilation option, see Descriptions of SQL processing options.

Source tokens

Tokens from your source program do not always appear in messages exactly as they appear in your program. For example, leading zeros are removed from integer tokens.