Using External Files |
To start reading a file from its beginning, you can move the "read" pointer to the first record in a file. Then, the next FGET or FPUT function manipulates the first record. To return the "read" pointer to the file's first record, use the FREWIND function.
In addition to reading records sequentially, you can generally designate records for later reading, or you can re-read a file's first record. However, some file types do not support this feature.
When a record is in the FDB, you can mark it so that the "read" pointer can read it later. For example, because there are no search functions for files, you may want to mark a found record so you can use it again. To designate a record for later reading, perform these steps:
Use FNOTE to mark the record that is in the FDB for later reading.
Use FPOINT to return the "read" pointer to the marked record when you are ready to read it.
After you are finished using the marked record, use DROPNOTE to delete the note marker and to free the memory that was allocated to store the note.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.