ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Invert decimal separator for numeric data

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

  • Invert decimal separator for numeric data

    Hi all
    I’m developing an RPGLE application for Zebra PDA TC26; as Zebra numeric keyboard , have decimal point (in the view together to number) , i would like to let the user , enter number with dot to separate decimal values also if normally we use comma to indicate the decimals in a number.
    For example : in the DSPF , user enter 1234.56 that from DB is 1234,56 (4 integers and two decimals) ;
    how could i solve this matter ? i asked to Zebra assistance for change dot to comma in the numeric keyboard, but they told me that the only way i sto configure another keyborad and is not too easy ..
    any other had e similar problem?
    Thanks in advance

  • #2
    So you want the DSPF field to accept full stops and commas as the decimal separator?
    I don't know if you can do that with a numeric field. I would code the field as a character field, and write RPGLE code to validate that the field contains a valid number, and to convert it to a numeric variable for database storage

    Comment

    Working...
    X