SELECT TESTCOL,NUMBERCOL+DENSERANK() OVER(
ORDER BY NUMBERCOL,(TESTCOL) ASC)*10000 AS NUMBERCOL
TESTCOL NUMBERCOL TESTCOL NUMBERCOL
CAAF 1190000.00 Canal Espelhado 700-Regra 1 1190000
CAAF 1190000.00 Canal Espelhado 700-Regra 2 1200000
CORPORAÇÃO ACIVS 1200000.00 Canal Espelhado 752-Regra 1 1210000
CORPORAÇÃO ACIVS 1200000.00 Canal Espelhado 752-Regra 2 1220000
CSARF 1210000.00 Carteiras Gerenciadas 1230000
Canal Espelhado 700-Regra 1 1220000.00 Cartões 1240000
Canal Espelhado 700-Regra 2 1230000.00 CAAF 1250000
Canal Espelhado 752-Regra 1 1240000.00 CAAF 1250000
Canal Espelhado 752-Regra 2 1250000.00 Chile 1260000
I am not an expert in DB2. However, I think you can refer to this link and its explanation on order by and compare with that of DB2.
It can be due to the way they work differently. It is just my opinion.
I had a similar situaton where the order by gives different results between Windows and Mainframe, and the issue was resolved by setting the collating sequence as below. You can try one of the two below. Hope this helps.
.SET SESSION COLLATION EBCDIC ;
.SET SESSION COLLATION ASCII ;
It is best to attempt to match the collation in use by DB2. This could be part of a DB2 locale specification. In Teradata, collation can be customized with the Multinational collation, or if the collation matchs the binary order of the client character set, then CHARSET_COLL can be used. See: