View previous topic :: View next topic
|
Author |
Message |
de_jha_vu
New User
Joined: 11 Oct 2005 Posts: 3 Location: Philippines
|
|
|
|
im reading a SAM file. after the read, i move 0 to eof-flg2 since i have to re-read it again from the start whenever it conforms with my given condition.
the code goes something like this:
read1.
read sam-file1 into record1
at end move 1 to eof-flg1
go to read1-exit.
if condition 1 then
move field1 to var1
perform read2 thru read2-exit.
move 0 to eof-flg2.
read1-exit. exit.
read2.
read sam-file2 into record2
at end move 1 to eof-flg2.
if field2 = var1 then
move ... to...
end-read.
read2-exit. exit.
but im getting status code 46 = ATTEMPT TO READ THE NEXT NONEXISTENT RECORD
and when i displayed eof-flg2,its equal to 1.
it should be equal to zero.
how can i get to read the sam-file2 again from the start of the file? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Where do you close sam-file2, and then re-open it so that the pointer is moved back to the top? |
|
Back to top |
|
|
Aji
New User
Joined: 03 Feb 2006 Posts: 53 Location: Mumbai
|
|
|
|
Hi,
Once you r going for reread, initialize the key field (or move low values to key field), start (using start command) on the key field, read the record.
Records
Aji Cherian |
|
Back to top |
|
|
|