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



Good catch.

Paul

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Patrik
Schindler
Sent: Monday, August 23, 2021 7:55 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Implement SQL in logical files

Hello,

sometimes, it's helpful to note down the problem at hand, or to explain it
to someone. This helps in thinking.

I had another look at the LF definitions, and at the screen shot of an
unrestricted (without S/O statements) LF query provided in the ZIP archive
here:

https://leela.pocnet.net/~poc/sql-to-lf-examples.zip

Then I saw it: While an SQL join outputs records without a match in the
opposite table (with NULL values in fields not being filled), LF join does
not. If a record isn't found in the other file, nothing is output.

Next, I've been browsing through the DDS reference PDF for clues about this
behavior. So, today I learned about JDFTVAL:

Use this file-level keyword in a join logical file so the system provides
default values for fields when a join to a secondary file does not produce
any records. JDFTVAL is valid only for join logical files.


Now I can test for default values (0 or blanks) in the corresponding fields
with select/omit. Works like a charm! And still *much* faster than SQL on my
low-end equipment. ;-)

Thanks to everyone who responded!

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

Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com


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.