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



It's been a long time - you have a FORMAT parameter that has to match what the RPG is going to work with, right? Is the JOIN LF used in the FORMAT parameter? Is it the only thing in the FILE parameter? Your KEYFLD stuff has to line up somehow, too, can it use MAPFLDs?

I'm done - talking too much through my hat!

Vern

On 3/2/2020 4:16 PM, dfreinkel wrote:
If I had the option, I would convert to ILE and use SQL too.

Going backwards is backward....

Darryl Freinkel
A4G.
Tel: 770.321.8562 Ext 111 | Cell: 678.355.8562

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Vernon
Hamberg
Sent: Monday, March 2, 2020 5:08 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Using OPNQRYF issue with a missing key.

Hi Darryl

You have to use SHARE(*YES), so that the called program can use the ODP
- open data path - created by OPNQRYF.

Other than that, I don't know what is happening - seems about time to go
with SQL in the RPG. Or create an SQL index with the same name as whatever
is used in RPG, and maybe it can be an index over a JOIN VIEW and include
the columns you want in it.

Thinking crazy I am!

Cheers
Vern

On 3/2/2020 2:41 PM, dfreinkel wrote:
I have an issue where there is a CL program with an OPNQRYF using
SHARE(*YES) on a JOIN LF.


I had to change the program from SHARE(*YES) to SHARE(*NO) only to
find that the keys on the OPNQRYF are different to the keys defined in
the DDS of the JOIN file. The SHARE(*YES) allows this or did allow it
until another modification came through when the RPG program crashed on
loading the RPG.

The keys defined in the join LF are:

* Key 1 (both files)
* Key 2 (second file only)
* Key 3 (both files)


The OPNQRYF keys are as follows:


File1.Key1

File2.Key2

File1.Key3



Can this be achieved in defining the join LF?


TIA


Darryl Freinkel

A4G.

Tel: 770.321.8562 Ext 111 | Cell: 678.355.8562


--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.