Page 1 of 1

PA 2.09 Code function negative number

Posted: Wed Jun 22, 2022 2:38 pm
by _BM_
Hello,

I'm currently testing PA 2.09. I've now noticed that PA seems to return a different value for the CODE function.
However, it only seems to affect umlauts.
The server parameters are the same for version 10.2.

Does anyone have any idea why this might be?

Re: PA 2.09 Code function negative number

Posted: Wed Jun 22, 2022 5:29 pm
by gtonkin
Have you tried using CodeW?

Edit: Looks like it should be 220 so CodeW not needed. Will test tomorrow and post results. Also -36 is suspiciously like 220-256…

Re: PA 2.09 Code function negative number

Posted: Wed Jun 22, 2022 6:49 pm
by lotsaram
Just replicated this and yes CodeW produces the correct result. But what the hell is CodeW? It's undocumented. Why does this exist as opposed to the Code function actually producing the correct result?

Re: PA 2.09 Code function negative number

Posted: Wed Jun 22, 2022 7:00 pm
by gtonkin
CodeW and CharW are both undocumented but for use with characters above #FF or non-8-bit.

Edit: Looks like IBM have recently added a page for CodeW and CharW

Re: PA 2.09 Code function negative number

Posted: Thu Jun 23, 2022 6:45 am
by _BM_
With CODEW it seems to fit.
It's still strange that there are differences here.

Thanks very much!

Re: PA 2.09 Code function negative number

Posted: Thu Jun 23, 2022 6:55 am
by gtonkin
I would recommend that you log a case to get IBM to review and address rather than change your code.