IBM / db2forzosdeveloperextension-about

IBM Db2 for z/OS Developer Extension for VS Code
https://IBM.github.io/db2forzosdeveloperextension-about/
Other
12 stars 7 forks source link

Formatter does not handle ^= (Not equal) properly (<> works) #122

Closed ThomasLieser closed 6 months ago

ThomasLieser commented 9 months ago

In Version 2.1.4 the formatter does not recognize ^= It will put a blank between the two characters. The <> notation works

FALLAI-Denis commented 9 months ago

Hi,

According to the Db2 for z/OS, basic predicates reference documentation, the ^= operator does not appear to be explicitly supported, and appears to be a derived form of the != operator, or the ¬= operator, and could depend on the characters encoding used. Although this operator may be supported, its use is not encouraged. Personally I have never seen it used in several decades of using Db2 for z/OS.

What codepage do you use on mainframe to code your source programs? How is the sequence ^= rendered if you browse a DBRM (by requesting a UTF-8 display)?

katsoohoo commented 9 months ago

Thanks for the background @FALLAI-Denis. We'll look into this as well @ThomasLieser.

Happy Holidays!

FALLAI-Denis commented 9 months ago

Hi,

As for request #121, it is necessary to take into account the encoding used on the mainframe and its interpretation after local transfer.

Hex    0037  0500  1141  1147
-----  ----  ----  ----  ----
x4C6E   <>    <>    <>    <>
x5A7E   !=    ]=    Ü=    §=
x5F7E   ¬=    ^=    ^=    ^=     <-- use case for this issue
xB07E   ^=    ¢=    ¢=    ¢=     <-- invalid

@ThomasLieser: I think you are using EBCDIC codepage IBM-1141 on your Mainframe/Db2 system, which is why you are seeing ^= after local transfer (in UTF-8 encoding).

Warning: the codepage declared in the Db2 system is not necessarily the one declared for the 3270 terminal (which is not recommended).

ThomasLieser commented 9 months ago

misunderstanding on my side - solved - thanks for the help

ThomasLieser commented 9 months ago

reopened to give the team the time to react see https://github.com/IBM/db2forzosdeveloperextension-about/issues/121

equalchenbj commented 6 months ago

@ThomasLieser ^= can be recognized in version 2.1.5. Closing this issue. Feel free to reopen it if you have further questions.