Jump to content

CMS file system

From Alfawiki
CMS file system
Company typeFile system
IndustryComputer software
ProductsFile system for IBM CMS

The CMS file system serves as the original file system designed for IBM's Conversational Monitor System (CMS), a subsystem within the VM environment. It remained the exclusive file system for CMS until the arrival of the CMS Shared File System during the VM/SP era.

Minidisks

Within CP-67 and VM, disk volumes can be partitioned into virtual units known as minidisks. Among these, a CMS minidisk is formatted specifically with the CMS file system. Other minidisks may be formatted for different operating systems such as OS/360, but these do not qualify as CMS minidisks even if allocated to a CMS virtual machine.

A CMS virtual machine is capable of accessing up to ten minidisks at once. Each minidisk is identified by a letter in the filemode field. The S disk contains CMS system files in a read-only format; often, the Y disk acts as an extension of S. The A disk, which is read/write enabled, holds user files including customization settings, program source code, and executable programs. Letters from B through Z are available for user data storage. When opening a file without specifying a disk letter (FILENAME FILETYPE *), the system searches disks alphabetically. The second character in the specifies attributes related to reading, writing, and sharing.[1]

The ACCESS command is used to associate a minidisk with a drive letter; for instance, ACCESS 191 A designates unit "191" as minidisk "A."

Initially, CMS minidisks utilized 800-byte blocks, but later iterations support larger block sizes of 1024, 2048, or 4096 bytes, significantly increasing storage capacity up to 231 disk blocks and records.Cite error: The opening <ref> tag is malformed or has a bad name

The first two blocks on any minidisk are reserved for IPL purposes. The third block contains the volume label identifying that specific minidisk. The fourth block, known as the Master File Directory (MFD), functions as the directory header and includes a bitmap called QMSK, which monitors allocation status of each 800-byte block. Beyond this MFD structure, various record types may be stored non-contiguously across the disk.

File system structure

CMS employs a flat file system architecture. The MFD holds disk addresses pointing to blocks containing File Status Table (FST) entries. Each FST block accommodates twenty entries of 40 bytes each that describe individual files. An FST entry comprises:[2][3]

Offset Length Name Description
0 8 FSTFNAME Filename stored as characters, left-justified and padded with spaces
8 8 FSTFTYPE Filetype represented by characters, left-justified and space-padded
16 2 FSTDATEW Date of last modification in MMDD format (binary)
18 2 FSTTIMEW Time of last modification in HHMM format (binary)
20 2 FSTWRPNT Write pointer indicating item number (binary)
22 2 FSTRDPNT Read pointer indicating item number (binary)
24 2 FSTFMODE Filemode
26 2 FSTRECCT Count of records/items
28 2 FSTFCLPT Disk address of initial chain link record
30 1 FSTRECFM Record format type—fixed or variable
31 1 FSTFLAGS Flags field
32 4 FSTLRECL Length or maximum length per record (binary)
36 2 FSTBLKCT Number of 800-byte blocks allocated to the file (binary)
38 2 FSTYEARW Year when last written (binary)

The initial chain link block referenced by an FST entry holds disk addresses for up to forty additional chain link blocks and as many as sixty data blocks. Subsequent chain link blocks can reference up to four hundred data blocks each. This hierarchical structure permits CMS files to reach sizes up to 16,060 blocks (approximately 12,848,000 bytes) with a maximum of 65,533 records.

CMS records—termed items—may be either fixed-length or variable-length; mixing these within one file is prohibited. Fixed-length records use the FSTLRECL value to define their size, allowing direct calculation of record position based on block number and offset. Variable-length records specify their maximum size via FSTLRECL and include a two-byte prefix indicating record length.

In 1979, Virtual Machine/System Extensions (VM/SE) Release 2 and Virtual Machine/Basic System Extensions (VM/BSE) Release 2 introduced the Enhanced Disk Format (EDF). This enhancement expanded file system capacity by enlarging the File Status Table and incorporating multiple tiers of chain link blocks, thereby supporting larger CMS file sizes.[4][5]

See also

References

  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named IBMKB
  2. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named DataAreas
  3. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named FSTD
  4. ↑ Template:Cite conference
  5. ↑ Lua error in Module:Citation/CS1/Configuration at line 2123: attempt to index field '?' (a nil value).