Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
Kristof Anthonis <Kristof.Anthonis@xxxxxx>
07-03-2018 15:06
Strange problem (bug?) varying fields
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
This mailing list archive is Copyright 1997-2026 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.