Proper syntax:
%Xlate(X'00010203...up to 39':*Blank:string);
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Francois Lavoie
Sent: Thursday, November 18, 2021 17:10
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: [EXTERNAL] Re: Remove unprintable chars
So the do loop: it will check every char in the string
Havent tested this but does it compile/work?
Xlate('00010203...up to 39':*Blank:string);
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Bruce Vining
Sent: Thursday, November 18, 2021 17:08
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: [EXTERNAL] Re: Remove unprintable chars
I am obviously missing something in this thread. Xlate is going to touch every byte of the input string and replace the characters, ScanRpl is going to touch every byte of the modified input string and replace x'39' with a blank. The proposed approach uses one touching of each byte vs two.
Admittedly a coded loop rather than a built-in implementing a loop, but it doesn't strike me as "being right" (though perhaps easier to code), but then I'm an old guy who's, as I said, probably missing something here.
Confidentiality Warning/Avertissement de confidentialité:
This message is intended only for the named recipients. This message may contain information that is privileged or confidential. If you are not the named recipient, its employee or its agent, please notify us immediately and permanently destroy this message and any copies you may have. Ce message est destiné uniquement aux destinataires dûment nommés. Il peut contenir de l'information privilégiée ou confidentielle. Si vous n'êtes pas le destinataire dûment nommé, son employé ou son mandataire, veuillez nous aviser sans tarder et supprimer ce message ainsi que toute copie qui peut en avoir été faite.
--
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@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
Confidentiality Warning/Avertissement de confidentialité:
This message is intended only for the named recipients. This message may contain information that is privileged or confidential. If you are not the named recipient, its employee or its agent, please notify us immediately and permanently destroy this message and any copies you may have. Ce message est destiné uniquement aux destinataires dûment nommés. Il peut contenir de l'information privilégiée ou confidentielle. Si vous n'êtes pas le destinataire dûment nommé, son employé ou son mandataire, veuillez nous aviser sans tarder et supprimer ce message ainsi que toute copie qui peut en avoir été faite.
As an Amazon Associate we earn from qualifying purchases.