|
On Jan 14, 2020, at 2:04 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx> wrote:
Will it handle 3 blank contiguous fields?
On 1/14/2020 12:41 PM, Francois Lavoie wrote:
This will solve the 2 consecutive blank fields being replace by only 1 comma:
Str=%ScanRpl(' ':',':V1+V2+V3+V4+V5+V6);
^ 5 spaces
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Barbara Morris
Sent: Tuesday, January 14, 2020 13:20
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Field concatenation
On 2020-01-14 12:07 p.m., Francois Lavoie wrote:
I think if 2 consecutive vars are blanks it will be replaced by onlyI think this was already mentioned, but if the v1 v2 etc aren't trimmed, they would be replaced by several commas for each vN field. If the values are trimmed, then an all-blank value wouldn't be replaced by any commas.
1 comma, not what you want
I don't think there's any way to avoid either doing all the IFs or
(better) writing a procedure.
--
Barbara
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post
a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our
affiliate link: https://amazon.midrange.com
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
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.