SQL statement text formatting

SQL statement text is displayed unformatted in the main body of the DB2® reports. Complex SQL statements may be difficult to interpret, therefore for readability purposes the SQL statement text in the report detail windows is displayed formatted. To view the formatted SQL text in the detail window, use the ‘++’ line command or press the Enter key as a shortcut. If statement formatting fails for any reason, it is displayed unformatted in the detail window with an accompanying warning message.

When a formatted static SQL statement is displayed, all tokens are separated by a single space, with two possible exceptions:

When a formatted dynamic SQL statement is displayed:

If the unformatted SQL statement text is truncated and leaves a trailing string literal or escaped identifier with no terminating delimiter, the formatted SQL statement text will display with a matching closing delimiter appended, to prevent a parsing error.

SQL statement text with DBCS identifiers (for example, Japanese or Korean) is always displayed unformatted.