Personally, I would not use sql or opnqryf over such a large file. There is going to be a performance hit especially with opnqryf. I believe, but may be wrong, that sql will also build and access path. In these situations I've build a key over the transaction file and depending on the information passed used the full key to start or partial key (i.e setll using begin date or setll using begin date and first item). Then get the additional files when needed. If the program must access the Customer Master you may want to include the customer id in the key of the detail file. This way you can read the customer master only when the customer changes per date/item combination.

Reply With Quote