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



The hex values do not contain x'0D' - they have x'25'.
The eye is easily tricked when looking at a long string of hex...
For example: 26B40D181
Is it 26 B4 0D 18, or is it 6B 40 D1 81?
--buck

On Tue, 27 Oct 2020 at 16:31, Greg Wilburn
<gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

I have a string of text in a database field that was a result of CPYFRMIMPF.

I know the string contains x'0D' (CR) several places... I can see it in debug when I place that field into a data structure subfield (SQL Select Into).

I'm trying to use %SCANRPL to replace the CR with a pipe character... it simply doesn't do it. What the heck am I doing wrong?

dcl-c PIPE const('|');
dcl-c CR const(x'0D');

rp(x).note = %scanrpl(CR:PIPE:rp(x).note);



In debug, the value of my character field looks like this (literally):

Dear Michelle and Dillon,
Sending heartfelt congratulations to you both on your wedding with wishes for health and happiness in your marriage.
All our best,
Jessica, Chris, Jake, Eryn and Cate Brown

If I change the representation to HEX, it looks like this:

00C6C485819940D4898388859393854081958440C489939396956B25E28595848995874088858199A3868593A340839695879981A3A49381A3899695A240A39640A896A4408296A38840969540A896A49940A685848489958740A689A38840A689A28885A2408696994088858193A388408195844088819797899585A2A240899540A896A4994094819999898187854B25C193934096A499408285A2A36B25D185A2A28983816B40C3889989A26B40D18192856B40C599A8954081958440C381A38540C29996A69540404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040


TIA
Greg
--
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

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.