
The POS command can be used to move the file pointer of an open file. It can also be used to extend the file size through cluster pre-allocation.
POS needs two arguments. The first one is a file handle that must previously be opened by any means such as the OPEN, NEW or APPD commands. The second argument is the new zero-based absolute position of the file pointer.
ERR_OK (0) if the file pointer is moved successfully.
ERR_NOT_OPEN (32) if the given handle doesn't represent an open file.
ERR_FR_XX (13...25) file system error if the file pointer could not be moved for any reason.
POS 1 200
Moves the file pointer of a file that is open as handle #1 to position 200 (zero-based)
If the file is open for reading or writing, the next read or write access will continue from the new position. If a file is open for writing and the file pointer is moved beyond the file size, that file is enlarged to the new file pointer position. In this case, content between the old and the new position is unpredictable.