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



We tried that. It can be (not necessarily is, but *can* be) a recipe for a mess.

We had a logical file used in many programs. I don't recall whether we just made a field mandatory or it was added to the physical file. Regardless, the programs using the pre-existing logical never considered this now critical field. After a couple years, we had to dig into the cause of the problems we had seen arise in the system where the physical file was central. We finally discovered that several programs were ignoring a field not on the logical and leaving us with a bunch of bad data.

Using the technique described can be functional, but just like using LFs referencing the PF file format, you've got to pay attention and do research and modify other programs to keep all your data clean. I've found that even when IO may seem to be so ideally suited to native file access. The more productive route (in the long view) is to use SQL.

Note that in the example above, we would still have had to modify programs to deal with the now critical field. There really aren't any shortcuts to managing the database and system, but overall I have found SQL to be far more efficient. Plus new hires brought in to work on IBM i for the first time, are more comfortable and productive when SQL is used.

Michael Quigley
Computer Services
The Way international
www.TheWay.org

-----Original Message-----
----------------------------------------------------------------------

message: 1
date: Wed, 29 Jun 2022 07:31:05 +1000
from: Frank Kolmann <Frank.Kolmann@xxxxxxxxx>
subject: Re: AW: Avoid Level checks was ( Generic RPG File Handler for
File I/O using OA)

Thanks Brian

1. LVLCHK(*yes) must be used.
2. I have restored huge files. Unless it is a RSTLIB I put in a process to delete
LFs, restore , recreate LF, rebuild still takes time but at least the Restore is
done.
3. You need a deeper understanding of how a level check works. In your LGL
you need to define all the fields the LGL needs.
The method I propose does not work if the LGL has no fields defined.
Then when you recreate LGL (for those with defined fields) the Level Check
passes ok.
4. The technique also makes keyed PF unnecessary.
5. SQL without the LGL/Indexes to support can be slower than a wet wick.

Frank


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.