Hello,
I have a very strange problem using varying fields in RPG. We are running on V7R2.
I 've defined these three fields:
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.
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??
I have a very strange problem using varying fields in RPG. We are running on V7R2.
I 've defined these three fields:
Code:
d Wrk_XML s a len(131064) varying d Wrk_S1 s a len(5000) varying d Wrk_S2 s a len(5000) varying
Code:
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
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??
Comment