CMS file system

The CMS file system is the native file system of IBM's Conversational Monitor System (CMS), a component of VM/370. It was the only file system for CMS until the introduction of the CMS Shared File System with VM/SP.[1]

Disk organization

CMS uses virtual disks called minidisks to store files. A minidisk is a contiguous subset of a real disk which functions like a real disk. VM allows minidisks to contain various types of data such as OS/360 or DOS/360 datasets as well as CMS-formatted data.

A CMS virtual machine can have up to ten minidisks accessed during one session. The user references the minidisks by a letter, part of a field called the filemode. The S disk contains CMS system files and is read-only; the Y disk is usually an extension of S. The read/write A disk contains user files such as customization data, program sources, and executables. Other drive letters B through Z can contain data as defined by the user. If a file is opened without a filemode letter specified ( FILENAME FILETYPE *) the disks will be searched in alphabetic order. The second character of the filemode is a number indicating read, write, and sharing attributes.[2]

The ACCESS command is used to access a minidisk. For example: ACCESS 191 A would access the virtual disk assigned to this user as unit "191" (virtual channel and unit address) as minidisk "A".

A minidisk in early versions of CMS is formatted into 800-byte blocks. Later versions of CMS allow minidisks formatted as 1024-, 2048-, or 4096-byte blocks, which increased the limits described here to 231 disk blocks and 231 records.[3]

The first two blocks on a minidisk are reserved for IPL. The third block contains the label identifying the minidisk. The fourth block, called the Master File Directory or MFD, is the directory header for the minidisk. The MFD also contains a bitmap called QMSK indicating the status of each 800-byte block on disk, used for allocation. Following the MFD all record types may be scattered and intermixed on a disk.

File system structure

CMS uses a flat file system. The MFD contains an array of disk addresses of blocks containing File Status Table (FST) (directory) entries. Each FST block contains twenty 40-byte FST entries, each describing a file. The contents of one FST entry are:[4]

OffsetLengthNameDescription
08FSTFNAMEFilename (character), left-justified and space-filled
88FSTFTYPEFiletype (character), left-justified and space-filled
162FSTDATEWDate last written, MMDD (binary)
182FSTTIMEWTime last written, HHMM (binary)
202FSTWRPNTWrite pointer [item number] (binary)
224FSTRDPNTRead pointer [item number] (binary)
242FSTFMODEFilemode
262FSTRECCTRecord [item] count
282FSTFCLPTDisk address of first chain link record
301FSTRECFMRecord format, fixed/variable
311FSTFLAGSFlags
324FSTLRECLLength or maximum length of each item [record] (binary)
362FSTBLKCTNumber of 800-byte blocks in file (binary)
382FSTYEARWYear written (binary)

The FST entry points to the first chain link block for the file. The first chain link block contains the disk addresses of up to 40 additional chain link blocks, followed by the disk addresses of up to 60 data blocks. The remaining chain link blocks each contain the disk addresses of up to 400 data blocks. this results in a maximum size of 16,060 800-byte blocks, or 12,848,000 bytes, for any CMS file. The maximum number of records in one file is 65,533.

Records are usually called items in CMS terminology. CMS files can have either fixed or variable record format; record types may not be mixed in a file. For fixed-length records the length is defined by FSTLRECL, and the location of any fixed-length record can be computed by (item_number-1) * record_length/800. The quotient will be the block number and the remainder will be the offset of the item in the block. Variable-length records have a maximum length of FSTLRECL bytes, and are preceded by a two-byte record length field indicating the actual length.

An enhancement to the original CMS file system in VM/SP, called Enhanced Disk Format (EDF), allows larger files by expanding the FST and introducing multiple levels of chain link blocks.[5][6]

References

  1. IBM Corporation (1976). IBM Virtual Machine Facility/370 (PDF). p. 178-. Retrieved August 3, 2016.
  2. IBM Corporation. "File Mode Letters and Numbers". IBM Knowledge Center. Retrieved August 3, 2016.
  3. IBM Corporation (March 1979). I BM Virtual Machine Facility/370: CMS User's Guide (PDF). p. 83. Retrieved August 3, 2016.
  4. IBM Corporation (February 1976). IBM Virtual Machine Facility/370: Data Areas and Control Block Logic (PDF). p. 179.
  5. "The CMS EDF file system". binghamton.edu. Retrieved August 5, 2016.
  6. IBM Corporation. "FSTD". ibm.com. Retrieved August 5, 2016.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.