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



Le 25/07/2020 à 20:01, Patrik Schindler a écrit :
Hello Marc,

Am 25.07.2020 um 13:09 schrieb Marc Rauzier <marc.rauzier@xxxxxxxxx>:

Maybe to be sure that records remain sorted in arrival sequence in the member, for programs reading the file using some sort of RPG cycle?
Hm, I can't see an use case for that, nowadays. Most often, databases have an ID counter or something like that, automatically incremented. I forgot the special IBM term for it. But this is of course my perception.

Hello Patrick

Other people already gave you their opinion about this topic. In mine, the important word in your questions is "nowadays". I do agree that, if one has to start creating a brand new application, they will probably use SQL based database design and all the modern ways to access the data. And this is a highly valuable idea.

But we are talking here about IBM i which is supposed to be used for business related activities. This is not a system for developers (all Unix/Linux based systems do exist for that). This is not a system for players (all Windows systems do exist for that). This is a system, just like zOS, for production activities. The main purpose is to be efficient and reliable. As Vernon says, there are a lot of existing applications softwares which are still relying on techniques which were provided by the operating systems a long time ago. And, I do agree with Bruce that changing the default value, for example from RESUSEDLT(*NO) to REUSEDLT(*YES) for CRTPF, of a parameter of a command (I mean with an OS upgrade or PTF install) is not a good choice, even if it is described in the Memo to users or cover letter. There is a risk for the applications to be changed if they still need to use the old default but did not forced it.

Other contibutors talked about performance reasons in regard to REUSEDLT(*NO). I am quite sure that if you want to read an entire table on the arrival sequence, using an old RPG cycle like program reading the physical file will be much more efficient than reading on an index based on SQL ROWID or similar column. If you do not mind, I can share an experience about such a situation. I had to work on a job which was reading an entire large file, on the sequence of keys set up in a logical file (the logical file was used in the program). The job was too long. To improve it, before reading the file, we added a step to sort it according to the logical file keys (check out FMTDTA command) into another temporary file, and we replaced the program which was reading the logical file by keys with another one wich was reading the sorted physical file by arrival sequence. Even with the extra time for sorting the data, the overall duration was divided by 3 or 4. The OS was able to block as much as possible the IO when reading the physical file in arrival sequence, while blocking was not possible using the keys sequence.
Let's go back from the 90s to nowadays. It is possible that SQE is smart enough to provide the same kind of performance improvements when reading a table on a ROWID column. I do not really know.

Just my opinion and sorry to be long.

:wq! PoC

PGP-Key: DDD3 4ABF 6413 38DE - https://www.pocnet.net/poc-key.asc



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.