|
> The limit for character fields is 65535, not 32767, but > that might also be too small. Does this technique get passed the 65535A limitation? If so, can I define the character field as 1A so I don't have to keep up with size limitations? Also, if that is the case, can I define the variable tracking the size of allocated memory differently? (The limitation to a 10I 0 is 65535, right?) This is important to me because I currently working on a project where I'm receiving a XML document through sockets programming. I append each sockets read (packet) to a character hold variable. I'm told that once we start testing production responses the XML document may be very large, more than 65535A. If this technique gets passed that limitation I code it that way now. If not, I'm open to ideas. > For that parameter, you might want to switch back to > passing a pointer > by value. Instead of declaring a field for the buffer, > use ALLOC to > allocate data large enough for the buffer. > > To handle the buffer data, you would use a based 65535A > field and > gradually walk its basing pointer through the data. > > D bufP S * > D workP S * > D workVar S 65535A based(bufP) > D totalHandled S 10I 0 > > C alloc buflen bufP > C callp ... > > C eval totalHandled = 0 > C eval lenHandled = 0 > C dow lenHandled < returnedLen > C eval workP = bufP + totalHandled > C ... handle some data in workVar > C eval totalHandled = totalHandled + whatever > C enddo > > C dealloc bufP > > Barbara Morris > +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.