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



Y'all

I'm certain that we can't join PF & LF - from the manual - Join logical files combine different fields from more than one physical file into a single record.

Maybe Patrik can give a more-detailed example - I can think how we use a file here that has employee numbers for both an employee and its manager, with detail information for each according to their own employee number. In RPG, I can see using 2 CHAINs to the same LF, in order to get the names of both employee and manager on the same line of a report.

So what is the actual need here?

Cheers
Vern

On 7/15/2024 6:36 AM, paultherrien@xxxxxxxxxxxxxxxxxx wrote:
I think...you can use logical file names. Haven't tried it though.
Can you create a LF over the PF and then join the PF & LF?

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Patrik Schindler
Sent: Monday, July 15, 2024 5:11 AM
To: Midrange Systems Technical Discussion <midrange-l@lists.midrangecom>
Subject: Translate SQL Join to DDS LF

Hello,

I'm searching for the DDS equivalent of the following SQL JOIN statement:

SELECT … FROM table1name
LEFT JOIN table2name join_name ON ( … )

The join_name is required when one needs to join the same table2name multiple times but interrelate the same field in table2name to different fields within table1name.

These are referred in the field list as SELECT join_name.field_name FROM …

The DDS compiler naturally complains about the same PFs being referred multiple times if just adding them multiple times but with different join fields. According to the DDS Reference, it's not allowed to name join specifications in pos. 19.

Hints welcome.

:wq! PoC



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.