• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Scientific Notation on Large Fully-Numeric App Vars

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scientific Notation on Large Fully-Numeric App Vars

    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:
    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!

  • #2
    Thank you for the information. This will be addressed in the next 6.3 update.

    Comment

    Working...
    X