× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If you have to define it at the maximum occurs, what does being dynamic buy
you?  Would you immediately go in at program startup and resize it back down
to a reasonable number?  Would that be the benefit?

You say "as for an array".  I thought I had seen examples of people starting
off with a 100 element array and then resizing it to 200?  You can't do
that?

The end result I'd like to get to is to have an I/O routine that gets a
bunch of records (by RPG, SQL, Stored procedure, whatever), sizes an array
or ds to hold them based on the number it found, then just return a pointer
to the structure along with the number of records contained in it.

So, would the I/O module have to declare the MODS at the maximum Occurs, get
the records, then reallocate the MODS back down to the actual number of
records retrieved, then return to the calling program?  Then, the calling
program would have to do the same thing, start off with a maximum size ds,
and reallocate it down after it got the pointer back from the I/O module?

Is that the scenario? Would there be any performance issues here, when an
application may be doing this for hundreds of files?

> -----Original Message-----
> From: Jon Paris [SMTP:Jon.Paris@Partner400.com]
> Sent: Wednesday, April 10, 2002 2:51 PM
> To:   rpg400-l@midrange.com
> Subject:      Separation of Presentation, BL, and I/O Tiers
>
>  >> I've seen several posters saying they could, but have seen no examples
> of that, yet.
>
> MODS can be based (and therefore dynamically sized) just as arrays can.
> The
> limitation (as for an array) is that you must define the number of
> occurrences as the largest number you will ever need.  I like the
> technique
> because it has the added advantage that you can have multiple definitions
> of
> the DS and map them to individual occurrences of the MODS so you simply
> directly compare multiple occurrences.
>
> You can also use things like the C qsort and bsearch routines to sort and
> search the MODS.
>
> Jon Paris
> Partner400
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.


************************************************************************************************************************************************************************************************************
This message originates from Lincare Holdings Inc. It contains information 
which maybe confidential or privileged and is intended only for the individual 
or entity named above.
It is prohibited for anyone else to disclose, copy, distribute or use the 
contents of this message.
All personal messages express views solely of the sender, which are not to be 
attributed to Lincare Holdings Inc., and may not be copied or distributed 
without this disclaimer.
If you received this message in error, please notify us immediately at 
MailAdmin@lincare.com or (800) 284-2006.
************************************************************************************************************************************************************************************************************



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.