|
Hi all I hit a problem today that I didn't expect with reading a file in a CL routine. The first time looping through the file (150+ records) the program found the record (RRN=4 ) it was after and stopped reading at that point. The second loop attempted to read from the start again, but every variant I've tried always picks up from RRN=5 and reads from there. Initially I tried with OVRDBF POSITION(*START) ...loop1... DLTOVR and the same for the second loop. Then I tried with OVRDBF POSITION(*START) OPNDBF ...loop1... CLOF DLTOVR but I still get the same results. I've used this technique to skip forward records (read first record, then start the loop from, say, record 4), but not re-reading. Is CL incapable of re-reading earlier records? I know the caveat that you can't re read after hitting the end of file, but I'm nowhere near that point. For now I've split it into two programs, but I don't see why it can't be just the one. I did see mention of POSDBF in the archives, which I'll try tomorrow, but can anyone shed any light on this? Regards, Martin -- martin@xxxxxxxxxx AIM/Gaim: DBG400dotNet http://www.dbg400.net /"\ DBG/400 - DataBase Generation utilities - AS/400 / iSeries Open \ / Source free test environment tools and others (file/spool/misc) X Debian GNU/Linux | ASCII Ribbon Campaign against HTML mail & news / \
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.