leading zeros on numeric

5 pts.
Tags:
Numeric
RPG
In RPG how can I have a numeric field that keeps leading zeros?

Software/Hardware used:
ISeries, RPG

Answer Wiki

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

I would say : why not use an edit word, or the %EDITW() function ?
You could also defined your own edit code.

Could you give us a sample of what you want to do ?
Thx

Discuss This Question: 3  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
  • Littlepd
    %editc(number:'X')
    1,130 pointsBadges:
    report
  • TomLiotta
    Since you can't stop a numeric field from having leading zeros when those positions are zero, I guess we have to assume that the question is about the result of converting a numeric value to a character value, either by assignment to a character field or by printing or displaying the value. The %editx() builtin functions can help for assignments. And edit codes or edit words can help for print or display. An explanation of what is meant by "have a numeric field that keeps leading zeros" would be helpful. Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    Need your input - what are you trying to do and are you actually using RPG or RPGLE?
    51,365 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