|
Here are the details. The history file contains information on all parts received. The exception file has certain parts that require additional quality testing that the vendor does not do. I need to read the history file for a certain time period and if I find that one of the parts in the exception file has been received I write the testing instructions to the print file. If one of the parts in the exception file is not found in the history file for the time period selected, I need to print a line that says something like "part 123 not received". With an OPNQRYF over the history file, I can read the exception file then chain to history. If I find a record, I can write the the testing instructions. If no record is found then I can write the "part not received" line. I can join both files with sql, but I don't know how to make it write the "part not found" line. Some one mentioned coalesce() and I am in the process of researching it to see if it will do what I need. Thanks, Terry > message: 6 > date: Wed, 14 Sep 2005 22:05:47 +0000 > from: vhamberg@xxxxxxxxxxx > subject: Re: MIDRANGE-L Digest, Vol 4, Issue 1736 > > Does the OPNQRYF include a JOIN to the exception file? If not, how is it > that you don't need to chain to the exception file in that case? At any > rate, you can certainly join to the exception file with SQL, too. Again, > can you show us the details? It's hard to comment on what we do not know. > > Cheers > Vern > > -------------- Original message -------------- > > > It's true that I can get the same selection with SQL that I can get with > > OPNQRYF. The excess I/O comes in because I can't chain to the SQL > > selection like I can with the OPNQRYF. The only way I know to do this > > with SQL would be to select the records from the history file based on a > > date range, then fetch each record and chain to the exception file to > > see if item selected is found there. This would mean chaining out to the > > exception file hundreds of times rather than chaning to the history file > > 4 or 5 times. > > > > Thanks, > > > > > > Terry > > > > > > > >
As an Amazon Associate we earn from qualifying purchases.
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.