Hello CNX support,
I have an issue with the setAppVar procedure and how it treats fully numeric strings.
The setAppVar procedure in RPGLE is turning fully-numeric strings that are more than 21 characters long into scientific notation, and I need to prevent that.
If I do this in RPGLE:
Then the app variable becomes this:
But if I do this in RPGLE:
Then the app variable becomes this:
I'm on version 6.3.20250207.0.
I understand that in version 6.3.20250325, the setAppVar procedure for numeric values retains decimal point and precision when applicable, and that previously a value of "1.0" would become "1". But I think this is unrelated.
It would be awesome if we could indicate as an entry parameter that this is a CHAR and that I want it to stay exactly as it was when I passed it into setAppVar.
Thank you!
I have an issue with the setAppVar procedure and how it treats fully numeric strings.
The setAppVar procedure in RPGLE is turning fully-numeric strings that are more than 21 characters long into scientific notation, and I need to prevent that.
If I do this in RPGLE:
setAppVar('myAppVariable' : '123456789012345678901'); // 21 characters long
Then the app variable becomes this:
'123456789012345678901'
But if I do this in RPGLE:
setAppVar('myAppVariable' : '1234567890123456789012'); // 22 characters long
Then the app variable becomes this:
'1.2345678901234568e+21'
?I'm on version 6.3.20250207.0.
I understand that in version 6.3.20250325, the setAppVar procedure for numeric values retains decimal point and precision when applicable, and that previously a value of "1.0" would become "1". But I think this is unrelated.
It would be awesome if we could indicate as an entry parameter that this is a CHAR and that I want it to stay exactly as it was when I passed it into setAppVar.
Thank you!

Comment