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



An expanding subfile is good up to 9,999 rows (the limit of a
subfile). Some would say that if the user wants to scroll beyond that
then they should be forced to put in a key value from which to re-start.
But, imagine the performance drain if you had to programmatically search
a
9,999 row subfile only to find that the requested key value is not in the

subfile and you then have to open a new cursor anyway? Now, it is
possible to do a binary search of the subfile and alleviate that problem.


A little off topic, but in defense of the expanding subfile limit:
I have a couple programs where I address this limit by a routine to read
the entire subfile into an array, writing it back offset a page, so that
the oldest records scroll out of the subfile if the user keeps holding page
down. Maybe its because we have a fast machine, but performance isn't bad
at all when you hit the 10K limit and it starts shifting. It looks
intense, but its all in memory, and 10K is not that bad to memory
operations.


dcl-ds SFDS extname('SHP300D':'SC4S':*all) dim(MaxSF) qualified INZ;

end-ds;


// Copy subfile records to keep into an array
for idx1=IncAmt+1 to lstrrn;

RRN4=idx1;

chain RRN4 SC4S SFDS(idx1-IncAmt);

endfor;

callp $clrsf4();

clear RRN4;

// Write array back to subfile, offset by IncAmt

for idx1=1 to lstrrn-IncAmt;

RRN4+=1;



// Set change flag for READC
if SFDS(idx1).X4OPT<>*blanks;

*in53=*on;

else;

*in53=*off;

endif;



write SC4S SFDS(idx1);

endfor;



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.