While displaying Sysview Performance Management Option for Db2 for z/OS (IDb2) SQL History in HTIDBSQL,
the command SORT 5 D (TotalElapsed Time) did not sort the data in descending order as expected.
The statement with 205 minutes is listed after the statement with 24 minutes. The expectation is for the 205 minute statement to be listed first.
The sorting feature is normally using binary (raw) data. The HTIDBSQL request and few others are using formatted data. Because of formatting
of the time interval field, there was an attempt to compare hundreds with tens of minutes and it causes that 24 minutes was higher than 205 minutes.
It can be fixed by changing the formatting in requests HTIDBSQL and HTUDSQL.
Change print format of STMT-ELAPSED field from ' MM:SS.TTTT' to 'H:MM:SS.TTT'. for HTIDBSQL and SUM(STMT-ELAPSED) field
from ' MM:SS.TTTT' to 'H:MM:SS.TTT'. for request HTUDBSQL.