× 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.



Actually the function is %trim and that will not remove embedded blanks, only leading and trailing blanks (page 550 of the ILE RPG Reference manual).


* Jerry C. Adams
*IBM System i Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
615.995.7024
fax
615.995.1201
email
jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Srinivas Boggula wrote:
Hi Mahesh,

Use trim Ex : eval xxx = trim(field)


Regards,
Srinivas







-----Original Message-----
From: rpg400-l-bounces+srinivas.boggula=igate.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+srinivas.boggula=igate.com@xxxxxxxxxxxx] On
Behalf Of Jonathan Mason
Sent: Tuesday, September 25, 2007 6:49 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: remove blanks
Using RPG (as opposed to RPGLE) I would use arrays and read through the
field one character at a time and if the character isn't a blank I would
copy it to another field.

An example program that uses this method in RPG400 can be found at
http://code.midrange.com/index.php?id=5a91e912d5

Hope it helps

Jonathan

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mahesh Pawar
Sent: 25 September 2007 13:50
To: RPG programming on the AS400 / iSeries
Subject: remove blanks
Hello,
I have field having data like this '2018 179 10' I want to remove
blanks
and result field must be '201817910'.
Please help me to get require result using RPG not RPGLE
Thanks in advance
mahesh

Thanks & Regards

Mahesh Pawar,
Mumbai,India,
Phone#(R) - 91-22-25442164,
Mobile# - 98204 46415
---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo!
FareChase.


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.