×
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.
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 only 1
comma, not what you want
I 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.
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
As an Amazon Associate we earn from qualifying purchases.