Subject: | |
From: | |
Reply To: | |
Date: | Sun, 25 Apr 2010 22:19:08 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Brian:
A message file is a special type of file.
The system generally reads only the first record (record 0). After the
read, the record is deleted and then the first record is read again.
Since you have set the FCONTROL item 47 to non-distruct status, the
program will keep reading the same record over and over again.
The solution would be to read the file by record number and watch for
end-of-file.'
Another solution is create another msg file and read the record from
your file and put it into the new file. When all the records are read,
delete the original file and rename the new file to that of the original
file.
Third solution, fcopy the original file to a flat file (which will empty
the contents of the msg file), then reload the msg with the flat file
contents and use the flat file in your program.
Olav.
Brian Donaldson wrote:
>I hope someone can give me a heads up on what I am doing wrong.
>
>I want to FREAD the records in a message file but I do not want them
>deleted.
>
>Before the FREAD I am calling FCONTROL item 47 (non-destructive read) but
>the program keeps
>FREADing the same record (first record) over and over with the program
>staying in an infinite loop.
>
>Can someone tell me how to get the program to read thru all of the records
>without deleting them?
>
>Thanks,
>Brian.
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>
>
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|