|
That depends on whether you share the open data path when you open the file (the SHARE on either the CRTPF/LF or OVRDBF commands). If a file is opened with SHARE(*YES) then if program A has read say the first record in the file, if you then call program B and read the same file it will read the SECOND record. Specifying SHARE(*YES) can be more efficient, but you need to design your system so as to allow for the previous scenario. If ni your case the file is opened SHARE(*NO) then when you issue your first read, yes it will read the first record in the file, in terms of either the key or the RRN, depending on how the file is defined in the RPG.
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.