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



Thank you! I appreciate all the solutions :)

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Booth Martin
Sent: Thursday, October 03, 2013 12:31 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Scan and Replace

fwiw, either of these two RPG solutions worked:

D wString40 s 40
D ds
D w40 40
D wArr40 1 dim(40) overlay(w40)
D wLen s 5s 0
....
// # 2
wString40 = '12 56 0123 5 7 9 8blanks';
dow %len(%trim(wString40)) <> wLen;
wLen = %len(%trim(wString40));
wString40 = %replace('': wString40: (%scan(' ': wString40)): 1);
enddo;
dsply wString40;

// # 3
clear wString40;
w40 = '12 56 0123 5 7 9 8blanks';
for wLen = 1 to %elem(wArr40);
if wArr40(wLen) <> *blanks;
wString40 = %trim(wString40) + wArr40(wLen);
endif;
endfor;
dsply wString40;

Result:

DSPLY 125601235798blanks

DSPLY 125601235798blanks


On 10/3/2013 8:47 AM, Kari Zeglin wrote:
I am a girl ;) Chuck is correct in what I was asking. Sorry if I had
confused anyone :)


--
Booth Martin
www.martinvt.com
(802)461-5349
Skype: booth.martin

As to Jesus of Nazareth...I think the system of Morals and his Religion, as he left them to us, the best the World ever saw or is likely to see; but I apprehend it has received various corrupting Changes, and I have, with most of the present Dissenters in England, some doubts as to his divinity. -- Benjamin Franklin
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (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 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.