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
Last Wiki Answer Submitted: April 1, 2010 1:06 pm by BillyBelgium190 pts.
All Answer Wiki Contributors: BillyBelgium190 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
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.
%editc(number:’X')
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
Need your input – what are you trying to do and are you actually using RPG or RPGLE?