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.