Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New FAQ - numeric to text with leading zeros

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Jan 11, 2001
1,373
US
I have created a FAQ on how to convert from numeric to text and have leading zeros. Here is the FAQ: faq317-4647

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux.
 
There is another way to do that.
Code:
EvalR Result = %TrimR(%EditC(Number:'X'));


RedMage1967
IBM Certifed - RPG IV Progammer
 
I use it when I have to print a line number on my input files for reformatting.
Code:
D Line           S        4S 0
/free

 %Subst(data:90:4) = %EditC(Line:'X');

/End-Free

This prints '0001', in position 90 of field data.

RedMage1967
IBM Certifed - RPG IV Progammer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top