Enscribe Programmer's Guide
a FUP ALTER command. When you do so, however, whatever you designate applies until you
reverse it with a subsequent FUP ALTER command or until the file is closed.
Table 8 summarizes the values that the various pointers are set to upon conclusion of the particular
system procedure.
In this table, count is the transfer count specified by the read or write procedure call. If the file is
an odd unstructured file, the value specified by count is the number of bytes transferred. If the
file is an even unstructured file, count is rounded up to an even number before the data is
transferred.
Table 8 File-Pointer Action
Pointer ValuesSystem Procedure
EOF pointer := next-record pointer; file label's EOF pointer := EOF pointer;CONTROL (write EOF)
current-record pointer := next-record pointer := EOF pointer := 0; file label's EOF pointer
:= EOF pointer;
CONTROL (purge data)
file pointers are unchanged; file label's EOF pointer := EOF pointer;CONTROL (allocate/
deallocate extents)
file label's EOF pointer := EOF pointer;FILE_CLOSE_ (last)
file label's EOF pointer := 0;FILE_CREATE_
file label's EOF pointer := 0;FILE_CREATELIST_
EOF pointer := file label's EOF pointer;FILE_OPEN_ (first)
current-record pointer := next-record pointer := 0;FILE_OPEN_ (any)
current-record pointer := next-record pointer := relative-byte-address;FILE_SETPOSITION_
current-record pointer := next-record pointer; next-record pointer := next-record pointer
+$min (count, EOF pointer - next-record pointer);
READ[X] or READLOCK[X]
file pointers are unchangedREADUPDATE[X]
file pointers are unchangedREADUPDATELOCK[X]
if next-record pointer = -1 then
begin
WRITE[X]
current-record pointer := EOF pointer;
EOF pointer := EOF pointer + count;
end
else
begin
current-record pointer := next-record pointer;
next-record pointer := next-record pointer + count;
EOF pointer:= $max(EOF pointer, next-record pointer);
end;
file pointers are unchangedWRITEUPDATE[X]
file pointers are unchangedWRITEUPDATEUNLOCK[X]
Legend
:= means “is set to”
$max represents a function in which the larger of the two specified values is used. $min represents a function in which
the smaller of the two specified values is used.
Sequential Access
FILE_READ64_, FILE_READLOCK64_, READ[X], READLOCK[X], FILE_WRITE64_ and WRITE[X]
operations increment the next-record pointer by the number of bytes transferred, thereby providing
sequential access to the file.
64 Unstructured Files