×

Good News Everybody!

The new search engine is LIVE!

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

This thread ...

Replies:

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.