You can create SFS files with entry-sequenced (sequential),
relative, or clustered formats. You can create each of the three SFS
file types by using CICSSDT commands. Files can
also be created programmatically. These three formats differ
in the organization of their records:
- Records in entry-sequenced, or sequential, files are organized
by their entry sequence numbers (ESNs), which describe the order in
which the records were inserted in the file.
- Records in relative files are organized by their relative slot
numbers (RSNs), which describe the position of each record in an array
of record slots.
- Records in clustered files are organized in a tree structure based
on the value of the key field or fields of the primary index.
Figure 1 shows sample records from each of the three SFS file types.
Figure 1. Sample records for SFS file types
- The MerchandiseOrders file is an entry-sequenced file.
Each record represents an order placed. The record is inserted into
the file chronologically, as each order is taken. The physical arrangement
of records provided by entry-sequenced files is optimal for applications
needing chronological access to information.
- The Inventory file is a relative file that stores information
about stock items for a company. The records are organized by stock
item number. The value of the StockNum field contains the RSN
for records in this file. Applications can directly access inventory
records using this number.
- The Accounts file is a clustered file. Its records are
physically ordered according to the value of the customerName and customerAddress fields.
Table 1 summarizes
the differences between the three types of SFS files.
Table 1. Comparison of SFS file types| Characteristics |
Entry-sequenced |
Relative |
Clustered |
| Primary index |
Implicit: based on entry sequence
number (ESN) |
Explicit: based on relative slot
number (RSN) |
Explicit: specified when the file
is created |
| Optimal type of access |
Chronological access, by ESN |
Direct access, by RSN |
Access through primary key value |
| Valid record types |
Fixed or variable length |
Fixed length slots, variable length
records |
Fixed or variable length |
| Maximum records per file |
236 - 10 |
232 - 10 |
264 - 10 |
| Limitations on updating records |
New record cannot exceed the size
of the original record |
New record cannot exceed the maximum
record size specified when the file was created |
New record cannot exceed the maximum
record size specified when the file was created |
| Capability to automatically reuse
space from deleted records |
No (must reorganize the file to
reuse space) |
Yes |
Yes |
For instructions on creating the different types of files
by using the
CICSSDT commands, see the following
topics. Files can also be created programmatically.