Guardian Programmer's Guide

Table Of Contents
Communicating With Disk Files
Guardian Programmer’s Guide 421922-014
5 - 77
Using Partitioned Files
Using Partitioned Files
When you create a file, you can choose to have the file reside on multiple volumes. A
file can span up to 16 volumes in this way. Moreover, the disk volumes can be
connected to the same or different controllers, on the same or different processing
modules, or can even span multiple systems. Once the file is created, the locations of
file partitions are transparent to the application. The user does not need to be
concerned about which partition to access; the user sees the file as contiguous.
The obvious reason for partitioning a file is to acquire more disk space for a file that
does not fit on one disk volume. Partitioning files, however, can also improve
application performance by taking advantage of parallelism:
If the file resides on several volumes connected to the same controlling device,
then disk-head movements (or “seek” operations) can overlap on the different disk
drives.
If each partition resides on a volume that is connected to a different controller, then
data transfers can occur concurrently.
If each partition resides on a volume connected to a different processing module,
then concurrent processing is possible.
For relative and entry-sequenced files, the application uses the primary partition until it
is full, then starts to fill up the first extra partition, and so on. For key-sequenced files,
you assign partial key values to each partition when the file is created; for example, the
first partition might contain keys A through J, the second partition keys K through Q,
and the third partition keys R through Z.
Creating Partitioned Files
To create a partitioned file, you need only create the primary partition; the extra
partitions are created automatically, assuming you give the system the correct
information. You can create a partitioned file either interactively using the FUP
CREATE command or programmatically using the FILE_CREATELIST_ procedure.
Note. Use care when naming your secondary partitions. For secondary partitions that reside
on a remote system with respect to the primary partition, you can use only names that have 7
characters or fewer, because one byte of the name is used to contain the node number.
Secondary partitions that reside on the same node as the primary partition can have up to 8
characters.