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



On 27 Mar 2013 14:19, Sam_L wrote:
I have a logical file uniquely keyed on ITEM and WAREHOUSE.

I have found an (incorrect) program that does a CHAIN to this
logical using just ITEM. (The assumption may have been that it would
get the lowest WAREHOUSE which is where most stock is, but it is old
code and I can't ask anyone.)

The code and declarations are unknown, however.... Given an /ascending/ key on WAREHOUSE, the /lowest/ key value for WAREHOUSE of all the matching values for the chosen ITEM will be retrieved for a partial key of just the desired ITEM.

I believe it sometimes gets a record that isn't the lowest WAREHOUSE
and ITEMS sometimes vanish from a report because there is no stock in
this warehouse.

That sounds like logic outside of the Access Path and the CHAIN; i.e. I do not understand how a key of ITEM+WAREHOUSE is related to inventory levels.?

Some eagle eyed person found items missing from a report from last
year. We restored the PF and the LF from a backup tape to another
library, reran the report, and the missing items correctly turned up.

That could be easily explained by the data having changed since the copy of the data taken in the backup. If the file was journaled, what had changed since the save would have been logged and available via DSPJRN.

I believe that there is no guarantee that if you do a CHAIN on ITEM
that you are guaranteed to get the record with the lowest value of
WAREHOUSE and that randomly we get another record.

I believe differently; given an ascending key definition for the not-null-capable WAREHOUSE field of the compound key.

Others are skeptical that I have found the cause, but it is a
complicated program stack and we haven't found any other reason.

I suggest looking further, elsewhere, for a possible defect in the code that could be causing issues. Does the program use commitment control to deal with concurrency, or does the program /assume/ that there will be no ill-effects from concurrent activity? I seem to recall that many issues over the years were concluded to have their origin in failure to code for concurrent operations being performed on the data.

Question 1: Am I on solid ground with my belief?

I do not think so. At least I do not feel there is any reason to believe that the CHAIN on ITEM is giving anything other than the lowest WAREHOUSE value... if indeed that properly describes the expectation.

Question 2: Does any one know of any documentation on this subject?

Nothing beyond what previous replies have offered.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.