|
Without going into a lot of research, it seems to me (and I could be dead wrong on this) that a program-described keyed file doesn't care much about the keys other than the total length of the key. In fact, in your case, I would hazard a guess that you simply need to define files with key lengths of 14, 16 and 18 (and with some suitable record length). Then you might be able to override to the appropriate file dynamically and then simply do a SETLL to determine the existence of a given key (which you would format as a single character field). I don't know this for certain. I'm really shooting from the hip here. But if all of those assumptions held, I'd just have a program that accepts the file identification information, an 18-character key field and a flag that says whether the data is 14, 16, or 18 characters. Then I'd override, open and SETLL. Joe
From: James H H Lampert I've got a knotty little puzzle here: I have a number of files. We know what their names are at compile time, but not necessarily which ones actually exist in any particular installation. We know that the files are keyed on two fields; the leading key is either 9, 11, or 13 bytes zoned decimal, and the secondary key is always 5 bytes, but we have no way of knowing at compile time what the length of the leading key is. All of this information can, however, be determined at runtime. We also don't know much about the record structure at compile time, beyond the keys. All we need to know is whether or not records exist for each of a series of specified composite key values.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.