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



On 2019-04-24 10:40 AM, Danny Hayes wrote:

I want to use %SCANRPL to replace all non-print characters in a string.


If you want to replace them all with the same character, use %XLATE.

If you want to remove them, then first use %XLATE to change all the non-print characters to one of the non-print characters, and then use %SCANRPL to remove them.
dcl-c nonprint_chars x'00010203...';
dcl-s all_same_nonprint_char char(%size(nonprint_chars))
inz(*allx'01');
dcl-c one_nonprint_char x'01';

string = %XLATE(nonprint_chars : all_same_non_print_char : string);
string = %SCANRPL (one_nonprint_char : '' : string);


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.