CMS file system: Difference between revisions

Content deleted Content added
Created page with '{{New page}} The '''CMS file system''' is the native file system of IBM's Conversational Monitor System (CMS), a component of VM/370. Until the i...'
 
additional info
Line 1:
{{New page}}
The '''CMS file system''' is the native [[file system]] of [[IBM]]'s [[Conversational Monitor System]] (CMS), a component of [[VM/370]]. Until the introduction of the [[CMS Shared File System]] with [[VM/SP]] it was the only file system for CMS.<ref name="VMLogic">{{cite book|last1=IBM Corporation|title=IBM Virital Machine Facility/370|date=1976|page=178-|url=http://bitsavers.trailing-edge.com/pdf/ibm/370/VM_370/plm/SY20-0885-0_VM370_System_Logic_and_Problem_Determination_Guide_1976.pdf|accessdate=August 3, 2016}}</ref>
 
Line 5 ⟶ 4:
CMS uses [[virtual disk]]s called ''minidisks'' to store files. A minidisk is a contiguous subset of a real disk which functions like a real disk. VM allows minidiaks 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 ''A'' disk contains user files such as customization data, program sources, and executables. Other drive letters ''B'' thuuthrough ''Z'' can contain data as defined by the user. If a file is opened without a filemode letter specified (<code FILENAME FILETYPE *</code>) the disks will be searched in alphabetic order. The second character of the filemode is a number indicating read, write, and sharing attributes.<ref name="IBMKB">{{cite web|last1=IBM Corporation|title=File Mode Letters and Numbers|url=https://www.ibm.com/support/knowledgecenter/SSB27U_6.2.0/com.ibm.zvm.v620.dmsb3/letnums.htm|website=IBM Knowledge Center|accessdate=August 3, 2016}}</ref> A CMS minidisk is formatted into 800-byte [[block(data storage)|blocks]].
 
Later versions of CMS allowed minidisks formatted as 1024-, 2048-, or 4096-byte blocks, which increased the limits described here by 2**311132,000 disk blocks and 2<sup>31</sup>-records.<ref>{{cite book|last1=IBM Corporation|title=I BM Virtual Machine Facility/370: CMS User's Guide|date=March 1979|page=83|url=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|accessdate=August 3, 2016}}</ref>
 
The <code>ACCESS</code> command is used to access a minidisk. For example: <code>ACCESS 191 A</code> would access the virtual disk assigned to this user as unit "191" (virtual channel and unit address) as minidisk "A".
 
The first two blocks on a minidisk are reserved for [[Booting#IPL|IPL]]. The third block contains the [[Volume (computing)#Volume label|label]] identifying the minidisk. The fourth block, called the ''Master File Directory'' or MFD, which is the [[Directory (computing)|directory]] header for the minidisk. Following the MFD all record types may be scattered and intermixed on a disk.
 
==File system structure==
CMS uses a [[flat file system]], pointers to all files on the disk are stored in the MFD. The MFD contains an array of disk addresses of blocks containing ''File Status Table'' (FST) (directory) entries. Following these is information describing the status of the disk used by allocation. Each FST block contains twenty 40-byte FST entries, each describing a file. The contents of one FST entry are:<ref name="DataAreas">{{cite book|last1=IBM Corporation|title=IBM Virtual Machine Facility/370: Data Areas and Control Block Logic|date=February 1976|page=179|url=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}}</ref>
CMS uses a [[flat file system]]: directory entries for all files are stored in the MFD.
{| class="wikitable"
|-
! 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 || 4 || 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.
 
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 item number and the remainder will be the offset into 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.
 
==References==