Sorry, that should have been an "EvalR" and edit code "Z" to remove the
leading blanks:

EvalR char_val = %EditC(Numeric_val : 'Z')

Best regards


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jonathan Mason
Sent: 21 August 2008 15:57
To: RPG programming on the AS400 / iSeries
Subject: Re: Best way to convert numeric with Decimals

Hi Adam

How about:

Eval char_val = %EditC(numeric_val : 'X')

All the best


Adam West wrote:
HI I have a field that has to be sent over as character. It is numeric
with many prices as 19.99, etc.
I want to send it as character ' 19999' for 7 pos. field.
I am looking for the neatest way to do in RPG.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].