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



If it must be RLA instead of SQL access, then OPNQRYF is the tool for the job. Then either a DDL created or DDS created [the latter can be a zero-member file] database file can be specified on the FORMAT() parameter. The database file could be created as a DDS keyed file or as a DDL INDEX [or DDL TABLE with PRIMARY KEY, if UNIQUE(*YES)]. Then the file can also serve as both the file against which the RLA HLL is compiled and the run-time ODP to which the OVRDBF SHARE(*YES) directs.

I am not sure how much of the following I got correct, no access to a system test to make it correct, but something like the following to play with:

CREATE TABLE X (X1 INT, X2 CHAR)
CREATE TABLE Y (Y1 INT, Y2 CHAR)
CREATE TABLE XY (X1 INT, Y1 INT, Y2 CHAR) RCDFMT JXY
CREATE INDEX XYIX ON XY (X1, Y2) RCDFMT JXY
CRThllPGM KOPNXYIX /* declares keyed RLA file XYIX */
OVRDBF XYIX SHARE(*YES) OVRSCOPE(as_required)
OPNQRYF QRYFILE(X Y) OPNID(XYIX) KEYFLD(1/X1 2/Y2) OPNSCOPE(per_ovr)
/* if 1/fld syntax not valid, then KEYFLD(X1 Y2) along
with MAPFLD((1/X1 X1) (2/Y2 Y2)); or some such */
CALL KOPNXYIX

Regards, Chuck

Jeff Crosby wrote:
Arrghh. I can't do it with DDS either. A DDS defined join logical requires all key fields to be in the first physical file.

Jeff Crosby wrote:
>> I have 2 SQL tables on my System i that I need to join to provide
>> RLA by key.
>>
>> I can't do that with SQL, either via a view or an index, can I?
>> I'm going to need DDS to get that ability, right?
>>
>> There ain't not no such thing as an index over a view.

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.