|
I don't think that will work, because the OP's example did not have a
decimal point in the character field. I believe he would still get
" 12.566.00".
On 12/9/2010 10:10 AM, Dennis Lovelady wrote:
There was a recent discussion about this. One should search thearchives
before posting. :)char
Having said that, this should work.
V3 = %EditC(%dec(%Subst(rpltxt:1:11):11:2):'J');
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"...Yes, the lectures are optional. Graduation is also optional."
-- Professor Brian Quinn
I need to edit a char value that resides in rpltxt which is a 80
--field left justified that looks lik this 00000012566.
I need it to end up in V3 edited to look like this 125.66
This is what I'm getting using the code below: ' 12,566.00
This is what I'm currently using that isn't working.
I know this is going the long way around, but got frustrated with my
original attempts.
appreciate your help.
ALP11 = %subst(rpltxt:1:11);
Num11 = %dec(alp11:11:2);
V3 = %EDITC(Num11:'J');
d rpltxt s 80
d Num11 S 11 2
d Alp11 S 11
d v3 s 50 varying
Regards,
SWBC
9311 San Pedro Ave., Suite 600
San Antonio, TX 78216
Visit our website at www.swbc.com
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com 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].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.