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



Jenell

a few points that should help to get you started. (i'm away from a 400
right now, so i can't verify any of this - your mileage may vary)

I think...

the rpg program itself doesn't know a join from any other file.  so, you
can write the rpg using your join, and override to the open query opnid.

You can create the opnqryf join useing the lf join as your 'output format'
file.

there used to be a book called 'open query file magic' sold by news/400 or
midrangecomputing publishers.  it is VERY good.

hth,

rick

----original message---------
I recently "discovered" OPNQRYF and I'm trying to figure out how (or if) it
I can use it in my current programming project.

Most of the information I need is in a detail file, however, two very
important pieces of information (the transaction date and the transaction
type) are only in a header file.  I was going to create a logical file that
joined the two physical files and then let the RPG program determine which
records to include in the report, based on parameters entered by the user.

I know that I can use OPNQRYF to select the desired records before the RPG
program starts.  The problem I have is that OPNQRYF will only open a join
file in input mode (*INP) and what I need is output mode (*OUT).  At least
that's how I read the IBM manual.

So here's my question, can I use OPNQRYF to select the desired records from
the physical files and still use the logical join file to access them from
my RPG program?  If not, do you have any other suggestions of what I could
try?  (I'm sure that this could be done with SQL, but I know even less
about how to do that than I do about OPNQRYF.)

Finally, could you suggest a good resource(s) for learning more about
OPNQRYF?

Thanks!




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.