|
How large is the vendor file? Less than 2500 vendors? If so, load the whole vendor list and add a scroll bar for the users. Its fast, attractive, and snazzy for a green screen application.. In a similar messy situation I loaded an array first. If you use an array first you can easily add the feature of sorting by any of the columns. Sort by name, by zip code, by state, by descending y-t-d amount, by date of last purchase, or whatever. --------------------------------------------------------- Booth Martin http://www.MartinVT.com Booth@xxxxxxxxxxxx --------------------------------------------------------- -------Original Message------- From: Midrange Systems Technical Discussion Date: Friday, June 13, 2003 10:23:37 AM To: Midrange Systems Technical Discussion Subject: Re: Is it possible to do this with key fields? Vern, the application in question is strictly an inquiry subfile (list of vendors), so this is input-only. The problem I am dealing with is that the program was poorly written and I am making what would normally be a simple modification. In the course of my modification and testing, I found a defect with the original program that affects the page up function (in some cases, the first record shown on the subfile also appears as the last record on the subfile after a page up). The modification is basically intended to add more record selection criteria to what shows up in the subfile. What I have done in the interim is to set up an OPNQRYF on the file with KEYFLD(*FILE) ALWCPYDTA(*NO) OPTIMIZE(*FIRSTIO) and the new data selection. There is a minimal startup delay that I *think* the users can live with, and it solves the problem with the page up issue, but introduces a new one; if page up is done from the beginning of the file, it rolls back to the end of the file. This is curious because I can't duplicate it in the original program or in my modified program without the OPNQRYF. I think that, because of the minor impact of the new problem, the SQL solution you propose may become strictly academic now. However, I would still be interested in investigating this for future purposes. Does SQL have an option like OPNQRYF's OPTIMIZE(*FIRSTIO) to open up the file quickly? TIA, Dan
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.