Enscribe Programmer's Guide

in an application that requires fast unstructured access and derives no real benefit from the
use of cache memory.
Refreshing the End-of-File (EOF) Pointer
Each file's end-of-file (EOF) pointer is kept in its file control block (FCB) in main memory. To maximize
performance, the EOF pointer is normally written to the file's disk label only when needed.
Although refreshing the file's disk label only under limited conditions maximizes system performance,
certain considerations should be taken into account. These considerations do not apply in the case
of TMF audited files, because the EOF is recovered by the autorollback feature.
If an open file is backed up, the EOF pointer in the file label copy on tape does not reflect
the actual state of the file. An attempt to restore such a file results in an error.
If the system is shut down (each processor module has been reset) while a file is open, the
EOF pointer in the file label on disk does not reflect the actual state of the file.
If a total system failure occurs (such as that caused by a power failure that exceeds the limit
of memory battery backup) while a file is open, the EOF pointer in the file label on disk will
not reflect the actual state of the file.
There is an autorefresh option for Enscribe files that you can enable or disable by using FUP ALTER
commands or FILE_CREATE_ system procedure calls. This option, when enabled, causes the disk
label to be refreshed automatically each time the file label changes, including the EOF pointer
field. This autorefreshing is always on for key-sequenced and queue files; any REFRESH setting is
ignored.
The additional I/O caused by the REFRESH ON option can decrease processing throughput
significantly. For applications that cannot afford this overhead, the EOF pointer in the file label on
disk can be forced to represent the actual state of a file through periodic use of the DISK_REFRESH_
procedure. Execution of REFRESH writes the information contained in any FCBs to the file labels
on the associated disk volume.
The REFRESH option can also be set with the PUP REFRESH command. The REFRESH command is
useful before backing up a file that is always open (for example, where the application is always
running). At some point during the day when the system is quiescent (no transactions are taking
place), issue a REFRESH command for all volumes in the system. Then, when the files are backed
up, the file labels on the backup tape will represent the actual states of each file.
To use the equivalent SCF command, enter SCF CONTROL DISK $<volume>, REFRESH at the TACL
prompt.
System operators use the REFRESH command before initiating a total system shutdown to ensure
that all file labels on disk correctly represent the actual state of each file. The disk process, when
idle, periodically refreshes changed EOF pointers to the file label on disk regardless of the various
REFRESH option states.
Purging Data
Either the FUP PURGEDATA command or the CONTROL/FILE_CONTROL64_ procedure's purge
data operation can logically, but not physically, remove all data from a file by resetting pointers
to relative byte 0. Also, either the FILE_PURGE_ procedure or the FUP command PURGE can delete
a file from the disk directory.
Following are four ways to logically purge data from an Enscribe file:
1. The FUP PURGE command
2. The FILE_PURGE_ system procedure
3. The FUP PURGEDATA command
4. The CONTROL 20 system procedure
58 General File Creation and Access Information