|
I've added in the allocated data structure logic per your article (not yet tested, but it compiled so that's a start). I'm now trying to build a giant string and I'm having issues. The DS stuff worked b/c field sizes aren't changing, I just moved from having an explicit array to using a pointer instead. But for the single field, I have to give it a size, and that size is limited to 16773100. If I make it a smaller value, reallocating doesn't seem to allow it to have a value larger than the initial definition. I figure my approach is wrong here so any help would be great.
In this example, (just for ease of testing) I made the initial size 10 characters, but I want to add a value that is longer than 10 characters.
dcl-s formattedElement varchar( 100 );
dcl-s gp_SoapMsg pointer;
dcl-s gSoapMessage varchar( 10 ) Based( gp_SoapMsg );
gp_SoapMsg = %Alloc( SOAP_INCREMENT );
formattedElement = 'This is my new test element value';
gSoapMessage += formattedElement;
The contents of gSoapMessage is: 'This is my'
As an Amazon Associate we earn from qualifying purchases.
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.