|
Nigel, >From a performance point of view, using the ILE RPG "pointer method" is the way to go. You avoid the calls to QUSRTVUS, and you do not have to pre-allocate storage for your data structures or arrays. What you do is base (BASED) your structures on the user space storage, and increment directly through the user space. Though slightly dated (doesn't use all the latest pointer support currently found in ILE RPG) there are ILE RPG examples of using BASED structures in the System API Programming manual (not the Reference). One example would be using the List Object API, which is found in appendix B of the manual. Bruce Vining >Hi All, > >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? > >If I set it 'Really Big' this will obviously have a negative impact on >the amount of storage that the pgm uses. > >You can't use dynamic allocation because I don't know how items are >going to be returned via the API. > >The pointer method seems to be at a disadvantage when compared with >using the QUSRTVUS and incrementing the offset. > >Please someone tell me I got it wrong and that the pointer method is >the way to go. > >Nigel Percy > +--- | 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-2025 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.