×
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.
Mike,
This is off the top of my head, and untested:
pos = %scan(x'0d25': string);
dow pos > 0;
string = %replace(' ': string: pos: 2);
pos = %scan(x'0d25': string: pos);
enddo;
It replaces x'0d25' with a single space. (The %XLATE option replaces
x'0d' with a space, and x'25' with a space, resulting in two blanks.)
Having said that -- I would suggest that this is probably the wrong
approach. x'0d25' usually symbolizes a "line break" -- so you don't
generally WANT to replace it with blanks. Instead, you want to use it
as a delimiter to tell you that you've reached the end of one line, and
it's time to start another one.
Mike wrote:
I must be searching on the wrong keywords as I can't seem to find exactly
what I want.
We have a string that comes in from the web and within there is the hex
value '0D25' for a new line. I want to replace all instances of this hex
value with a space when I am displaying it on the green screen. How do I do
this?
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.