|
This is exactly what START does. In an AS/400 fashion: initialize key-a key-b key-c move Dept to key-a START EmpFile Key NOT LESS externally-described-key You will get a 23 if no "Dept" exists, otherwise issuing a READ NEXT will get the first record having "Dept" in its key. Sincerely. Domenico Finucci Fiditalia , Milano, 02- 4301-2494 -----Messaggio originale----- Da: Ravi Prasanna Annasagara Nagarajan [mailto:ravi.annasagara@wipro.com] Inviato: venerd́ 6 settembre 2002 10.43 A: cobol400-l@midrange.com Oggetto: Setting File pointer using Partial Keys This is a multi-part message in MIME format. -- -- [ Picked text/plain from multipart/alternative ] Hello, Using Start statement, can we position the file pointer if we have values for a part of the key. For example If an Employee file has 3 keys say Dept number, Section number and Employee number, using just the Dept number can we position the file at the specified Dept number even though Section number and Employee number are not specified? Move 10 to Dept-number Start Employee File Key is equal to Dept-number Invalid key ----- Not invalid key ----- End-Start. I have tried this but it seems to fail. In RPG, we can actually do a Chain to the file with partial keys, so is there a provision for that in Cobol? Any thoughts on this issue would be very helpful? Many thanks in advance. Regards, Ravi Prasanna A.N. Wipro Technologies Ltd., mailto:ravi.annasagara@wipro.com -- -- **************************Disclaimer************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *************************************************************************** -- _______________________________________________ This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list To post a message email: COBOL400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l or email: COBOL400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/cobol400-l.
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.