IBM Support

Local processing of character comparisons using collations

Troubleshooting


Problem

A data container in a report (e.g. list frame) specifies that rows are ordered (sorted) on a character column.

The order of the data differs when the report is executed using Compatible Query Mode (CQM) versus Dynamic Query Mode (DQM).

Symptom

A table is defined in Db2 Z  where a character column is encoded as EBCIDIC.
 
insert into TEBCDIC ( RNUM, CVCHAR ) values (1, 'A1A' );
insert into TEBCDIC ( RNUM, CVCHAR ) values (2, 'A2A' );
insert into TEBCDIC ( RNUM, CVCHAR ) values (3, 'a1a' );
insert into TEBCDIC ( RNUM, CVCHAR ) values (4, 'a2a' );
insert into TEBCDIC ( RNUM, CVCHAR ) values (5, 'B1B' );
insert into TEBCDIC ( RNUM, CVCHAR ) values (6, 'B2B' );
insert into TEBCDIC ( RNUM, CVCHAR ) values (7, 'b1b' );
insert into TEBCDIC ( RNUM, CVCHAR ) values (8, 'b2b' );
insert into TEBCDIC ( RNUM, CVCHAR ) values (9, '1a' );
insert into TEBCDIC ( RNUM, CVCHAR ) values (10, '2b' );
insert into TEBCDIC ( RNUM, CVCHAR ) values (11, null );
insert into TEBCDIC ( RNUM, CVCHAR ) values (12, '' );
insert into TEBCDIC ( RNUM, CVCHAR ) values (13, ' ' );
A query projects a result set where the data is ordered locally by CQM or DQM using the character column.
 

select CVCHAR, RNUM from TEBCDIC order by CVCHAR asc


If order is performed locally, CQM compares the character values returning the following result.
CQM collation
If order by is performed locally, DQM compares the character values returning the following result.
DQM collation

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB76","label":"Data Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"ARM Category":[{"code":"a8m0z0000001jkbAAA","label":"Reporting-\u003EPerformance"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"All Versions"},{"Product":{"code":"SS6G84","label":"IBM Cognos Analytics on Cloud"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
06 May 2025

UID

ibm17108889