|
> >> >Elimiate the OPNDBF command - you don't need it. On first read, RCVF will > >> >implicitly open the file > >> > >>The OPNDBF is required to be able to use POSDBF to reposition the file. > >> > >Ummm... not unless they've changed the rules. > > You do need OPNDBF (or OPNQRYF) to use POSDBF. Your method doesn't require > OPNDBF because your method doesn't use POSDBF.
This is wrong. The following code snippet will work very well for what you're asking: OVRDBF FILE1 POSITION(*RRN FMT1 12) RCVF RCLRSC *CALLER OVRDBF FILE1 POSITION(*RRN FMT1 8) RCVF
The above will read the twelfth record, and then the eighth record of the file. (Try it before you argue.)
> 2. Unless this is documented, it could change in a future release, whereas > using a shared ODP won't.
This documentation is freely available to all who would care to look it up. Do you need the link to the publications?
That quote is from the V4R4 manual, but V5R2 has the same thing: http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/cl/rclrsc.htm
Ken, you mention that:
> You are correct that POSITION(*START) is not required. > My OVRDBF did not show POSITION(*START), only SHARE(*YES).
I apparently never saw that code, and I cannot find it in the archives. Hence my confusion.
I didn't have any trouble finding it: http://archive.midrange.com/midrange-l/200306/msg01032.html
I cannot properly address, then, the question posed by you, that is unless you re-post.
With regards to the original question, the code I have supplied, and whose integrity I defend, should work nicely for you, Martin.
I goofed in my reply, thinking that Ken was the originator of this thread. Some of my comments were specific to the original question, rather than one that may have been posed by Ken.
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.