|
At 02:32 PM 4/14/98 +0000, Nigel Percy wrote: > Could someone give me some advice regarding using ILE RPG and list > API's via user spaces. As you know you can manipulate data in user > spaces via pointers in ILE RPG. If I going to be retrieving data via > an API into a user space and I have no idea how much data is going to > be returned, what do I set the Data Structure/Array Size to? Nigel, The list API header contains an offset to the start of the list, and the number of bytes in a list entry. You declare a based structure that provides a template for a single list entry, and then set the pointer to the first byte of the entry. This can easily be accomplished by overlaying the entire data space with an array of bytes. Length 32767 is usually sufficient. This doesn't actually use up any space in your program, just make sure not to reference space beyond the length of the data actually returned (also in the API header). Pete Pete Hall peteh@inwave.com http://www.inwave.com/~peteh/ +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.