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



Carel

We've issues with that esp. at 7.1 with emojis and other special characters like ellipses. You might be getting those. Our solution was to go with SQL's XML_TABLE - it converts anything it doesn't know about to X'3F' as I recall - you can do a scan-replace either in the SQL or in RPG. We did this also using one of the SQL functions to pull data from an IFS file, I forget the name, it's one of the CLOB_ functions or like that.

I got the XML_TABLE technique from a COMMON presentation by BIrgitta Hauser.

Hope that leads you somewhere useful.
Vern

On 2/24/2021 2:09 PM, Carel wrote:
Runnin on V7.1

We receive from a SAP environment xml documents which are stored as a CLOB in a PF on our system.

To process those xml documents we extract those documetns from that file, store it on the IFS and then read the IFS file in with XML-INTO.

Some of those xml documents crash on the XML-INTO opcode. It appears those xml documents contain non-printable charaters (less than x'40')

So, we have to remove those non-printable charaters.

I looked at QSH -tr command, but could not gget it to work.

Another option is using SQL when retrieving the CLOB from the PF before writing to the IFS.
Itried the following syntax:

exec sql
select REPLACE(CLOB_in_PF, x'0102 ... 3E3F', '') into :SQLCLOB_field from Our_PF ;  (thus all hex values with the exception of NULL).

This doesnot work.

Question:
How can we remove those non-printable characters from an xml document stored in our PF?

TIA

Kind regards,
Carel Teijgeler






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