×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) 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



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-2026 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.