× 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.



Gade wrote:

>I feel like my subfile is running really really slow. Could 
>somebody give me a good example for subfile & message 
>subfile programming in RPGIV where subfile page = size??.

When looking at performance problems, the very first place to look is the
total I/O required to present a screen.  For instance, let's say you have a
million records in a transaction detail file.  Your program wants to display
all the transactions for account 250.  Bad performance would come from
reading each record and comparing the account number to 250.  If it matches,
add the record to the subfile - if it does not, read another record.  This
can take a long time if the records for account number 250 all appear at the
end of the file.  One way to avoid this condition is to create a logical
file keyed on account number.  Do a SETLL / READ or READE loop to read only
the records you are interested in.

I haven't any SFLSIZ=SFLPAG subfiles so I can't post an example, but the
same performance criteria apply as for SFLSIZ<>SFLPAG.

>What are the modern ways of populating the subfiles in 
>ILE RPG???.

ILE RPG doesn't really offer any modern methods of populating a subfile per
se.  Think about replacing your subroutines with prototyped procedures and
pass parameters back and forth between them (don't use global variables!)
Don't be overly concerned that your two or three subroutines become 10
procedures.  Calling a procedure is NOT a performance hit compared to doing
I/O.

Buck Calabro
+---
| 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 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.