|
On 03/23/99 09:27:00 AM Colin Williams wrote: >I need to be able to create dynamic array in RPG IV, so that I can >decide the size of the array at program execution time. How would I go >about doing this. Depending upon how you want to use the array, you may be better served using a scratch file or a user space. >I see that there are the ALLOC commands, is this the best way of doing >it and how do I use them? You can use ALLOC or the bindable CEE APIs. The basic idea is to define your array with 32767 elements, based on a pointer. You ALLOC storage out of the default heap and use that as the pointer to your array. The RPG for ILE Programmer's Guide has a chapter on using the APIs for dynamic arrays. The April 97 issue of News/400 has an article on dynamic arrays. Buck Calabro Billing Concepts Inc (formerly CommSoft), Albany, NY mailto:mcalabro@commsoft.net * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the RPG/400 Discussion Mailing List! To submit a new * * message, send your mail to "RPG400-L@midrange.com". To unsubscribe * * from this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe RPG400-L' in the body of your message. 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.