Midrange News for the IBM i Community


Posted by: Viking
Information Systems
CA
LF records don't show up in SQL
has no ratings.
Published: 26 Dec 2012
Revised: 23 Jan 2013 - 2185 days ago
Last viewed on: 13 Jan 2019 (3247 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

LF records don't show up in SQL Published by: Viking on 26 Dec 2012 view comments(2)

We have some DDS-defined logical files on our system that DBU can work with just fine, but if I try to use SQL over them, there appear to be no records.  I was just experimenting with a couple different LFs to try to understand the pattern.  I have a join LF with selects/omits and new fields from substringed PF fields, and those records are not seen by SQL.  Another simpler LF is just over one PF but also has selects/omits and new fields from substringed PF fields, and those records are also not seen by SQL.  Another LF has some selects/omits and those records ARE seen by SQL.

In embedded SQL, I always use PFs, not LFs, but I was just trying to do some quick ad-hoc SQL to check the contents of some LFs when I noticed this behavior.

Just curious, what are the conditions that cause a DDS-defined LF to not have its records queryable by SQL?

Thanks.

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS