How to avoid sign

310 pts.
Tags:
AS/400
Data Type conversion
hi, i have a char field of 20 length, front end that field is alphanumeric , now suppose the data is -0.9, and i need to apply some calculations on it, when i move it into numeric feild for that , one dump occurs that is decimal data error. please help me how can i do it..... dump is---- decimal-data error at statement 175. A packed or zoned value does not contain valid numeric data. A digit and/or sign is not valid. ----- Thaks & Regards Ambrish Srivastava

Answer Wiki

Thanks. We'll let you know when a new response is added.

instead of move use the function %DEC( charFld : width : dec )

C eval fldn = %dec(%trim(char20):10:5)

Thanks a lot…..

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Ambrish 82
    thanks a lot
    310 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following