× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Joel,
see inline:

Joel said:

>Richard - when I said "MUST" below, I didn't mean that you would get an
>error - sorry about that.

>I meant that in my experience, if the first KEYFLD field is not from the
>first file, it forces OPNQRYF to read each record from the second file.
And
>then it takes forever.  Ive never seen this in writing, I made a note in
my
>book that OPNQRYF behaves this way.

that makes a little more sense.

>I think you should put *JOB in the scope of both the OVRDBF and the
OPNQRYF
>- that is probably why OPNQRYF is reading all the records in the file.
The
>OPNQRYF is no longer active by the time RPG gets it.

I tried this.  still doesn't work.  my rpg is reading the file directly,
disregarding the open query file.

>Also, use CPYFRMQRYF instead of RPG for debugging this problem - that will
>isolate the OPNQRYF and eliminate the RPG pgm to find the problem!

This won't help, because you can specify the OPNID from which to copy.  If
I CPYFRMQRYF, I get exactly the records I want, while the RPG reads all
records.

My problem is trying to get my rpg to recognize the override to the opnid,
rather than the file.

this, I guess, is what I'm looking for - the definitive answer - for an
opnqryf join, does the file name in a RPG program HAVE to be overridden to
the first file name of an opnqryf join?

thanks again,

Rick



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.