|
Joep Beckeringh had the key (no pun intended): > My experience with program-described files is that the key length in the F-spec is only used at compile time. At run time whatever > you use as key is 'thrown at the database manager', which handles it. So you might use a data structure as key and at run time use > the appropriate layout. So as an experiment, I simply set up a data structure for the key: DENTKEY 5 22A DCONKEY 3 20 DENCTKEY 1 18A DREFKEY 14 18S 0 DENTID 5 13S 0 DCONID 3 13S 0 DENCTID 1 13S 0 padding the "9+5" and "11+5" keys on the end, and wrote a simple program around it, with program-described F-specs for files of all 3 flavors (but treating all 3 as having the "13+5" key layout), taking parameters for the file number and the two keyfields, building up the key, trying to chain to the files, and DSPLYing the first 50 characters of whatever it finds. Once I got the thing to compile (i.e., the aforementioned padding on the "9+5" and "11+5"), and got rid of a DD error (by putting a CMD front-end on it), it worked perfectly. Which points out one crucial rule so many of us forget: just because something looks too simple to work doesn't mean it won't. -- JHHL
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.