Trimming trailing Zeros

2505 pts.
Tags:
AS/400
I have a numeric field of 25,9 in a file. I have a program which calculate this value. I want to appear this field in file without trailing zeros. If the value is 2,935.995000000 I want it to write to file as 2,935.995. How is this possible?

Software/Hardware used:
As400

Answer Wiki

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

Discuss This Question: 2  Replies

 
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
  • TomLiotta
    I have a numeric field of 25,9 in a file.   It's "numeric", but what is its data type? There are a number of different numeric data types. Technically, if the data type was zoned-decimal, you could force the value to be written to the file with trailing blanks; but it would be the cause of trouble later because it would be a numeric field that had non-numeric data in it. Later programs would have errors.   If you only want three decimal places, then don't define the field to have nine decimal places. You can't validly remove trailing decimal zeros without changing the definition. (Nor is there any reason to do it. Just because you want to, isn't a valid reason.)   Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    Any numeric field that is 25 - 9 contains 9 digits beyond the decimal.  When you use this field you can control how it is displayed, reported, or used in subsequent processing.  
    49,590 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