Enscribe Programmer's Guide
4 General File Creation and Access Information
This chapter describes general file creation and access information for all Enscribe file types.
File Creation
This subsection discusses certain parameters that you can specify and capabilities that you can
enable when creating Enscribe files.
File Codes
When creating an Enscribe disk file, you can assign it an arbitrary numeric file code. This code
is typically used to categorize files according to the kind of information they contain.
File codes 100 through 999 are reserved; using them causes unpredictable results.
If you do not specify the file code, it defaults to 0.
Disk Extent Sizes
When you create an Enscribe file, you can specify the maximum amount of physical disk space
to be allocated for that file. Physical space is allocated in the form of extents. An extent is a
contiguous block of disk space that can range in size from a single page (2048 bytes) to 65,535
pages (134,215,680 bytes) for format 1 files or to 536,870,912 pages for format 2 files.
For EKS files with increased limits, the primary partition has a primary extent size greater than or
equal to 140 pages. Each secondary partition has its own primary and secondary extent size.
By default every Enscribe disk file and partition has 16 extents; you can specify that a particular
nonpartitioned file or the partitions of a key-sequenced file have more than that number.
The first extent is called the primary extent, and its size can differ from the secondary extents. All
of the secondary extents for a given file or partition are the same size as one another.
If you do not specify the primary and secondary extent sizes during file creation, they both default
to one page.
The extent size must be an integral multiple of either the buffer size (for unstructured files) or the
block size (for structured files); the buffer size or block size, in turn, must be 512 bytes, 1 KB, 2
KB, or 4 KB. 32 KB block size is only supported for key-sequenced files with increased limits. The
file system automatically rounds up the specified extent size, if necessary, to enforce this requirement.
The file system also rounds up any extent size specified as an odd number of pages if the buffer
size or block size is 4096. Therefore, if you want to have a file with extent sizes consisting of an
odd number of pages, the buffer size or block size must be 2048 or less.
In addition, you can supply a value called MAXEXTENTS that specifies the maximum number of
extents (16 or greater) to be allocated for the file. If you do not specify the maximum number of
extents, it defaults to 16.
For partitioned files other than key-sequenced files, MAXEXTENTS is always 16 per partition. For
partitioned key-sequenced files, you can specify a MAXEXTENTS parameter greater than 16.
For non-partitioned files or partitioned key-sequenced files, you can also change the MAXEXTENTS
value dynamically during program execution by either issuing a CONTROL 92 procedure call or
supplying a MAXEXTENTS parameter in a FUP ALTER command.
File Formats Supported: Format 1 and Format 2
The D46 release supports larger partitions then were previously supported. This change allows
files and file partitions to increase from the format 1 size of 2 gigabytes to the format 2 size of 1
terabyte (although the upper limit of the actual file size depends upon the size of the largest single
disk).
46 General File Creation and Access Information