Sysview for Db2 IQL request returning DBG03038E syntax error in r20 but same request does not in r19
search cancel

Sysview for Db2 IQL request returning DBG03038E syntax error in r20 but same request does not in r19

book

Article ID: 143389

calendar_today

Updated On:

Products

SYSVIEW Performance Management Option for DB2 for z/OS

Issue/Introduction

The following error is revealed in the Sysview Performance Management Option for Db2 for z/OS (IDB2) r20 data collector log at startup
but the problem does not occur when running the IDB2 request in r19:

DBG03038E 07:45:18 THIS FIELD CANNOT BE USED IN DECLARE OR WHERE CLAUSE
          CMD-TXT(,4,16) = '-DIS'

Cause

IDB2 r20 introduced tighter controls over fields allowed to be used in a 'Where Clause' mostly relating to variable length fields, and in this case CMD-TXT.

Resolution

There has been a change in IDB2 r20 where stricter controls have been put in place for 'where clause' fields mostly relating to variable length fields
which CMD-TXT happens to be one of them. A sound circumvention is being offered to correct this failure by using IFCID 91 "COMMAND" to report
the end of the Db2 command execution instead of IFCID 90 "COMMAND-ST" reporting the start of the Db2 command. 

The following are the changes that were made:

Changed COMMAND-ST to COMMAND
Changed CMD-TXT to CMD-TXT-VAR field in WHERE clause (CMD-TXT-VAR is derived from CMD-TXT)
Changed the substring offset in the WHERE clause in the request:
CMD-TXT(,4,16) -> CMD-TXT-VAR(,4,14)
CMD-TXT(,4,3) -> CMD-TXT-VAR(,4,1)