|
In order to accomplish what you wish, you need to define the file key structure internally. The compiler will insist on matching the type and length of key fields for externally described keys otherwise. I believe there is a key length part of the file specification, but I don't know if that will work for an externally described file. Your other option is to define a key list using the fields from your data structure. Hope that helps. Donald R. Fisher, III Project Manager Heilig-Meyers Furniture Company (804) 784-7500 ext. 2124 Don.Fisher@HeiligMeyers.com <clip> I got an RPG error QRPG7078 "Factor 1 length not same as First-Key field in file or record. Specification ignored" in which the detail was "Factor 1 length is 41 but length of key field in file is 15." <clip> IPHMORE has a compound key of: Char 15; then PACK 6.0 signed; Char 2; Char 15; Char 2; and finally PACK 5.0 signed descend. WRKF this file to get at DSPFD logical confirms the file key is 41 long. The line of code that it is complaining about is BKEY CHAIN IPHMORE 92 I defined BKEY as a data structure, not a KLIST because I'm populating some key fields by copying the whole set of 6 fields in one move. <clip> +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.