|
Murali, The short answer is NO! Now, for the longer answer... If you want to do random access, you MUST use a file (either the physical or a logical) that is keyed by what you want to position by. OPNQRYF is great if you're only doing sequential access because it causes the file to be sorted, but it doesn't help you for random access. In other words, you can not chain to file DAHDRT00 unless the file is defined as having DAHDRFCD, DAHDRGRF, and DAHDRHFL as it's keys. If you need to chain by these fields (I'm guessing these are the keys you are interested in based on your OPNQRYF statement) and there isn't a physical or logical file already defined with these keys, you are going to have to create a logical file with these fields as the key fields. This will also have the benefit of making your OPNQRYF process faster since a temporary access path will not need to be built over this file. Matt -----Original Message----- From: N, Muralidhar [mailto:Muralidhar.N@blr.hpsglobal.com] Sent: Tuesday, January 21, 2003 10:06 AM To: 'RPG programming on the AS400 / iSeries' Subject: RE: keyfield My requirment is only to use opnqryf ,iam nt using logical file my question is that whether i can declare that file as "K" in F-spec since iam creating 3keyfields in opnqryf...hope u r clear with question! can i do chain on this file? Regards Murali <snip>
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.