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



I have a need to join two files as if they were three. We have an employee file that has an employee ID and an employees supervisors smeployee ID. We have a second file that is part of our menu system that has an employees employee id and their system userid and e-mail address. I want to create a single join file that has the employee's userid and e-mail and the supervisors userid and e-mail.

I can't do this
R EMFLE JFILE(UTPUNAME LWPEMFLE UTPUNAME)
J JOIN(1 2)
JFLD(USS# LWPCTID)
J JOIN(2 3)
JFLD(LWEMPS USS#)
The create fails saying there are two many "J" specs. Acts like the second UTPUNAME is being ignored.

So I tried creating an alias pointing to UTPUNAME named UTAUNAME and tried this..

R EMFLE JFILE(UTPUNAME LWPEMFLE UTAUNAME)

J JOIN(1 2)
JFLD(USS# LWPCTID)
J JOIN(2 3)
JFLD(LWEMPS USS#)
This create failed because it said DDM file UTAUNAME could not be accessed at remote location *LOCAL. We do have a *LOCAL defined under WRKRDBDIRE that net.data needed that points to the local system name. (Interesting that the SQL CREATE ALIAS used DDM files).

Can anyone offer any suggestions on how to fix the DDM issue or how to setup the kind of join I want to create?

p.s. The app that needs this is doing a JDBC connection from a PC and using SQL commands to access the data and could do two SELECT commands but I would prefer to keep the logic for how this join is defined and the fields it contains and what the application sees on the iSeries side and not in the PC application.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.