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.