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



What works is below code.
Please be my guest if you want to add X'404142' as long as you add same number of blanks to the 2nd parm of Xlate

dcl-s str char(1000);

str=X'12'+'some string'+X'350A13';

str=%Xlate(X'000102030405060708090A0B0C0D0E0F+
101112131415161718191A1B1C1D1E1F+
202122232425262728292A2B2C2D2E2F+
303132333435363738393A3B3C3D3E3F'
:' '+
' '
:str);

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Justin Taylor
Sent: Monday, November 22, 2021 13:57
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Remove unprintable chars


Per the CCSID chart, the first printable char is x'42'. So it sounds like the options are:
- Iterate thru each char and check < x'42'
- Use %scanrpl() for x'00' thru x'41'

Wow, either would be a lot of churning. Considering the low frequency, I think I'd be better off just trapping for the error.

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

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.