DSNH messages

Message numbers that begin with DSNH communicate information about the DB2® precompiler or the DB2 coprocessor.

References to the DB2 precompiler will 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 containing 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.

Message severity codes

One of the characters I, W, E, S, or U is shown at the beginning of each precompiler message as an aid to the programmer. These characters indicate the severity level as follows:

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, the return code will be forced to 4 if the return code was 8, and no host-related errors were detected. This is done so that the application can proceed with the compilation and link-edit steps. This allows the syntax checking to be delayed until bind. If a severity 8 precompiler error message is not a host-related error, the precompiler treats the error as a warning and place a W instead of an E in the precompiler output listing. In this instance, the precompiler also issues DSNH049I to indicate that the actual return code 8 from the precompiler was 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

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.