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



Janell Haskins wrote:

>I recently "discovered" OPNQRYF

Welcome to the ranks!  Before I get too far, I want to point out that there
are at least two FAQ entries on OPNQRYF.  Visit http://faq.midrange.com and
use the search link in the lower left to search for OPNQRYF.  I hope there's
some help in there.  I added Rob's links (thanks Rob!)


As I was typing this, I see that Werner posted an excellent example of
joining using OPNQRYF.  From an RPG perspective, using his example you would
to define a F spec with SRQSHA as input.  The OVRDBF he shows re-directs the
RPG program's I/O from SRQSHA to SRPSH.  SRPSH is the first file named on
the FILE parameter of the OPNQRYF statement.

>So here's my question, can I use OPNQRYF to
>select the desired records [and update them].

No.  A JOIN can't be updated.  Yet.  Maybe the DB2 team are working on that
as we speak...  The way I handle this sort of thing is to do the join via
OPNQRYF and declare another F spec where you would do your output/updating.
Read from the primary (selected records only) file and CHAIN/SETLL/READE to
the file you need to update.
  --buck


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.