CMS file system

From HandWiki
Short description: File system of the IBM VM/CMS

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

Minidisks

CP-67 and VM allow an installation to divide a disk volume into virtual disks called minidisks. A minidisk may be a CMS minidisk, initialized with the CMS file system. Other minidisks might be formatted for use by, e.g., OS/360, but these are not CMS minidisks even if they are assigned to a CMS virtual machine.[lower-alpha 1]

A CMS virtual machine can have up to ten minidisks accessed at one time[lower-alpha 2]. 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 CMS 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][5]

Offset Length Name Description
0 8 FSTFNAME Filename (character), left-justified and space-filled
8 8 FSTFTYPE Filetype (character), left-justified and space-filled
16 2 FSTDATEW Date last written, MMDD (binary)
18 2 FSTTIMEW Time last written, HHMM (binary)
20 2 FSTWRPNT Write pointer [item number] (binary)
22 2 FSTRDPNT Read pointer [item number] (binary)
24 2 FSTFMODE Filemode
26 2 FSTRECCT Record [item] count
28 2 FSTFCLPT Disk address of first chain link record
30 1 FSTRECFM Record format, fixed/variable
31 1 FSTFLAGS Flags
32 4 FSTLRECL Length or maximum length of each item [record] (binary)
36 2 FSTBLKCT Number of 800-byte blocks in file (binary)
38 2 FSTYEARW Year 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.

In 1979, Virtual Machine/System Extensions (VM/SE or SEPP) Release 2 and Virtual Machine/Basic System Extensions (VM/BSE or BSEPP) Release 2 provided an enhancement[6] to the original CMS file system, called Enhanced Disk Format (EDF), that allows larger files by expanding the FST and introducing multiple levels of chain link blocks.[7][8]

See also

  • IBM System/360 architecture
  • ESA/390
  • z/Architecture

Notes

  1. Minidisks have virtual channel and unit addresses (CUU) or subchannel numbers, which appear to the virtual machine to be real disk addresses. At the time IBM developed CP-67 and VM, real hardware devices were conventionally installed at specific addresses, for example address 190 would normally be a disk device '90'x on channel 1, and minidisks are still usually defined to CP following this convention. With VM/XA SP2.1 IBM shipped the bimodal CMS 5.5, which could run in an XA virtual machine, and with z/VM V4 stopped allowing an installation to define an S/370 mode virtual machine; due to these changes, the cuu address form is no longer relevant.
  2. There can be additional minidisks assigned to the CMS virtual machine but not accessed for use by the CMS file system.

References

  1. IBM Corporation (1976). IBM Virtual Machine Facility/370. p. 178-. http://bitsavers.trailing-edge.com/pdf/ibm/370/VM_370/plm/SY20-0885-0_VM370_System_Logic_and_Problem_Determination_Guide_1976.pdf. Retrieved August 3, 2016. 
  2. IBM Corporation. "File Mode Letters and Numbers". https://www.ibm.com/support/knowledgecenter/SSB27U_6.2.0/com.ibm.zvm.v620.dmsb3/letnums.htm. Retrieved August 3, 2016. 
  3. IBM Corporation (March 1979). I BM Virtual Machine Facility/370: CMS User's Guide. p. 83. http://bitsavers.trailing-edge.com/pdf/ibm/370/VM_370/Release_6/GC20-1819-2_IBM_Virtual_Machine_Facility_370_CMS_Users_Guide_Rel_6_PLC_1_Mar79.pdf. Retrieved August 3, 2016. 
  4. IBM Corporation (February 1976). IBM Virtual Machine Facility/370: Data Areas and Control Block Logic. p. 179. http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/370/VM_370/plm/SY20-0884-0_VM370_Rel_3_Data_Areas_and_Control_Block_Logic_Feb76.pdf. 
  5. "FSTD". IBM. https://www.ibm.com/docs/en/zvm/7.1?topic=instructions-fstd. 
  6. Melinda Varian (August 1977). "VM and the VM Community: Past, Present, and Future". SHARE 89. Sessions 9059-9061, M. After the Doubtful Decade. http://www.leeandmelindavarian.com/Melinda/25paper.pdf. "1979 brought us VM/370 Release 6 and Release 2 of BSEPP and SEPP, with logical device support, the EDF file system," 
  7. "The CMS EDF file system". http://dforeman.cs.binghamton.edu/~foreman./550pages/VM/CMS-File-System-1.doc. Retrieved August 5, 2016. 
  8. IBM Corporation (21 March 2002). "FSTD". http://www.vm.ibm.com/pubs/cms530/FSTD.HTML. Retrieved August 5, 2016.