× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Jeff,

CHROut is defined as 5a - it can never contain 1100.70 :-) Just make CHROut
bigger.

Regards
 
Paul Tuohy
ComCon
www.comconadvisor.com 
 
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of jstevens@xxxxxxxxxxxxxx
Sent: 03 November 2006 21:52
To: rpg400-l@xxxxxxxxxxxx
Subject: using %replace to remove ',' from text field

I'm trying to remove the commas in a field using the folling code...

     D CHRIn           s             17a   INZ('1,100.70')
     D CHROut          s              5a
      /free
        DoW ChrIn <> 'QUIT';
            ChrOut = %replace('':ChrIN:1:%scan(',':ChrIN)+1  );
            DSPLY ChrOUT ' ' ChrIN;
        EndDo;
       *INLR = *On;
      /end-free 


And it Produces the following result...

 DSPLY  00.70    1,100.70 


But I want it to produce
DSPLY    1100.70     1,100.70


Can anyone see where I'm going wrong?


Thanks!

Jeff Stevens
Mize, Houser & Co. P.A.
913 451 1882
JStevens@xxxxxxxxxxxxxx


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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.