|
Sorry for the double post. I forgot to change the subject line. 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 chaining to the history file 4 or 5 times. Thanks, > Terry > > message: 9 > > date: Tue, 13 Sep 2005 22:06:17 -0500 > > from: Vernon Hamberg <vhamberg@xxxxxxxxxxx> > > subject: Re: CALLPRC & CRTBNDCL > > > > Why would (B) mean a lot of I/O? You'd use selection criteria, just as > > you > > do with OPNQRYF. I mean, OPNQRYF and all SQL used to use the same code > > under the covers, as well as Query/400. > > > > You can have an embedded SQL that is exactly the same as what OPNQRYF > > gets > > you. Show us your OPNQRYF command and I'll put up the SQL equivalent - > > it's > > pretty easy. > > > > As someone else said in a recent post, OPNQRYF is always dynamic in its > > execution, embedded is static and usually faster. > > > > Vern > > > > At 01:41 PM 9/13/2005, you wrote: > > > > >O.K., I admit that I am not the sharpest tool in the shed when it comes > > >to SQL so here is what I am trying to do. I have a history file that I > > >need to read for a certain time period to see if certain parts have been > > >received during that time period. Ordinarily I would use embedded sql to > > >join the two files together and print out which parts from the exception > > >file were found in the history file. However, the requirements of this > > >project are to print a "part not received" line if the part in the > > >exception file was not received during the time period selected. The > > >only way I know to do this would be to either: > > > > > >A.) create an OPNQRYF over the history file in a CL and chain to it or > > > > > >B.) use embedded sql to pull the information out of the history file and > > >use that to chain to the exception file. > > > > > >I don't particularly like (B) in this instance because it seems like an > > >awful lot of I/O for the 4 or 5 parts in the exception file. I was going > > >to use (A) and that is where I ran into problems with the CALLPRC > > >command not knowing where the procedure was no matter how the cl was > > >compiled. > > > > > > > > > > > >If any one has other ideas, I am all ears. > > > > > > > > > > > >Thanks, > > > > > >Terry > > > > > -- > http://www.fastmail.fm - Choose from over 50 domains or use your own >
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.