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



Hello,

I have a very strange problem using varying fields in RPG. We are running on V7R2.

I 've defined these three fields:


d Wrk_XML s a len(131064) varying
d Wrk_S1 s a len(5000) varying
d Wrk_S2 s a len(5000) varying
I than run the following code. The TestEncode function does not in particular here, but in the real business case I want to do something there. This is just to show te problem.

Wrk_XML = '';
Wrk_S1 = 'Anthonis';
Wrk_S2 = 'Kristof';
Wrk_XML = Wrk_XML + '<Subject>' +
TestEncode(
'LabResult ' +
Wrk_S1 + ' ' + Wrk_S2) +
'</Subject>';
p TestEncode b
d TestEncode pi a len(5000) varying
d pi_s a len(5000) const varying
/free
Return pi_s;
/end-free
p TestEncode e
The result in Wrk_XML = <Subject> t Anthonis Kristof</Subject>
So, that is not correct.

When I change the definition of WRK_XML to

d Wrk_XML s a len(131063) varying

The result in WRK_XML = " <Subject>LabResult Anthonis Kristof</Subject>"
That is correct.

Can anyone explain this: why is this working ok for a length of 131063 or less, and not ok for 131064 and above?

Thanks for any answers!!
Kristof Anthonis

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.