Re: C-ISAM reestablish position
Posted in 1994
Wayne Williams (compus@mv.com) wrote: : I'm using the C-ISAM library and have been unable to determine a method of : saving and restoring the current positioning within a file. I want to traverse : a file by key, but be able to "reposition" at a known point in the file where : the program had previously read - and resume traversal (by key) at that point. : I know I can save isrecnum and read a record directly by record number but : there does not appear to be a way to set the positioning in the file back to a : given record number or address so that subsequent keyed access would proceed : from that point. The file may have (many) duplicate keys, so repositioning by : doing a key lookup is not a good solution for me. : Has anyone encountered (& resolved) a similar need? I've encountered similiar problem in the past using an ISAM type file system. The solution employed then was to have the same file opened twice (i.e. 2 file handles). This allows you to do your sequential reading on the dupe key path on one channel and use the other for your random reads. I haven't programmed directly using C-ISAM but it seems you should be able to use this approach if you don't have to do this with too many files. Hope this helps. Regards, Larry Jones @ --------------------------------------------------------------------- Caelus, Inc. ! Complete, Integrated Solutions! "You can observe a Spokane, WA ! for Manufacturers World-Wide ! lot by watching." (509) 455-8566 ! (HP-UX, OSF-1, AIX) ! - Yogi Berra