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 
> 
> 
> 
> 
> > message: 9 
> > date: Tue, 13 Sep 2005 22:06:17 -0500 
> > from: Vernon Hamberg 
> > 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 
> 
> -- 
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list 
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx 
> To subscribe, unsubscribe, or change list options, 
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l 
> or email: MIDRANGE-L-request@xxxxxxxxxxxx 
> Before posting, please take a moment to review the archives 
> at http://archive.midrange.com/midrange-l. 
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.