FORMAT
Purpose
- Initialize a minidisk for use with CMS files
- Count or reset the number of cylinders on a minidisk
- Write a label on a minidisk
Authorization
General User
Operands
- vdev
- is the virtual device number of the minidisk to be formatted. Valid addresses are 0001 through FFFF.
- fm
- is the file mode letter to be assigned to the specified device address. Any single character
letter, A through Z, excluding S, is valid. This field must be specified. If any other disk is
accessed at this mode, it is released. Note: If you specify S as the file mode, you will receive an error, DMSFOR048E Invalid Filemode S.
- nocyl
- is the number of cylinders to be made available for use. If this operand is omitted, or if the number specified exceeds the actual number of cylinders on the disk, all the cylinders on the disk are made available for use.
- noblk
- is the number of FB-512 blocks to be made available for use. If this operand is omitted, or if the number specified exceeds the actual number of blocks on the disk, all the blocks on the disk are made available for use. If necessary, the number used will be adjusted downward to the previous multiple of 2, 4, or 8 for a 1 KB, 2 KB, or 4 KB blocksize, respectively, as the number of FB-512 blocks formatted must result in an integral number of CMS blocks.
Options
- Blksize
- specifies the physical DASD block size of the CMS minidisk. Acceptable values are 512, 1024,
2048, and 4096. The block sizes 1024, 2048, and 4096 may alternately be specified as 1K, 2K, and 4K,
respectively. The BLKSIZE option defaults to a block size that optimizes the I/O and data storage for the particular device. CKD devices default as follows:
- DASD
- Default Block size
- 3380
- 4096
- 3390
- 4096
FB-512 devices, such as 9336, default to a block size of 4096. For more information on choosing an appropriate block size, see Usage Note 6.
- Noerase
- specifies for FB-512 devices that the permanently formatted FB-512 blocks are not to be cleared to zeros. If not specified, the FB-512 blocks will be cleared. For non-FB-512 devices, this option is ignored.
- Label
- writes a label on the disk without formatting the disk. The CMS disk label is written on
cylinder 0, track 0, record 3 of the minidisk, or block 1 of an FB-512 device. A prompting message
requests a six-character disk label. A valid label is composed of one to six numeric (0-9) or
alphabetic (A-Z) characters, or both. A label with fewer than six characters is padded with blanks
on the right. If the label specified has more than six characters, only the first six characters are
used. Note: Special characters, such as
(
or (a blank) are valid in a label with FORMAT, but may not be valid in other VM commands.LABEL can only be used with CMS formatted virtual disks that are accessed. If you choose to change the label (volume serial number) of an OS or DOS (for example, MVS or VSE) formatted disk, you must use some other utility to do so, such as Device Support Facilities.
- Recomp
- changes the number of cylinders/blocks (FB-512 blocks) on the disk that are available to you. If
you specify nocyl/noblk and that many cylinders/blocks are not available,
you only get the available number of cylinders/blocks. If you do not specify
nocyl/noblk, the maximum number of cylinders or FB-512 blocks last
formatted on the disk is made available to you.
RECOMP can only be used with CMS formatted virtual disks that are accessed.
Usage Notes
- You can use the FORMAT command with any virtual 9336, 3380, or 3390 device.
- When you do not specify either the RECOMP or LABEL option, the disk area is initialized by
writing a device-dependent number of records (containing binary zeros) on each track. Any previous
data on the disk is erased. A read after write check is made as the disk is formatted. For example:
initializes 25 cylinders of the disk located at virtual address 191 in CMS format. The command:format 191 a 25
changes the number of cylinders available at virtual address 192 to 25 cylinders, but does not erase any existing CMS files. To change only the label on a disk, you can enter:format 192 b 25 (recomp)
Respond to the prompting message with a six-character label.format 193 c (label) - If you want to format a minidisk for VSAM files, you must use the Device Support Facility. If you want to format an entire disk, you may use any OS or DOS disk initialization program.
- Because the FORMAT command requires heavy processor utilization and is heavily I/O bound, system performance may be degraded if there are many users on the system when you use FORMAT.
- When formatting FB-512 devices, enough blocks of the minidisk area must be formatted to support
the CMS disk structure, or message DMS216E will be displayed, and the FORMAT request will be
terminated. The minimum number of FB-512 blocks which must be formatted for minidisks of different
sizes are:
- Minidisk Blocksize
- Minimum Blocks Needed
- 512
- 7
- 1024
- 14
- 2048
- 28
- 4096
- 56
- When choosing an appropriate BLKSIZE to format a disk, there are two main concerns:
space utilization and performance.
On CKD and ECKD devices, you can allocate more bytes of user data per track using larger block sizes, provided your average file size is larger than the block size. For example, a single cylinder of a 3390 formatted at 4 KB BLKSIZE can hold 180 CMS 4 KB blocks, or 720 kilobytes on a single cylinder. However, when formatted at 512 BLKSIZE, a single cylinder of a 3390 will hold only 735 CMS 512 byte blocks, or 367.5 kilobytes. Thus, larger block sizes are generally preferable for CKD and ECKD DASD for optimum space utilization. However, if you have many small files, a smaller block size might be preferable, because each CMS block can only be used by a single file.
For FB-512 devices, smaller block sizes will tend to make better use of space on the disk. You get the same number of bytes of space for a given number of FB-512 blocks, regardless of the block size you choose. For larger block sizes, you will generally waste more space for each file, because on average, half of the last CMS block allocated to the file is unused.
FB-512 devices under FCP SCSI control will have better I/O performance when blocked at larger block sizes. BLKSIZE 4096 is recommended for FCP SCSI.
A BLKSIZE of 4 KB will optimize the I/O if the disk is to contain large files with no missing records (dense). A BLKSIZE of 1 KB is more appropriate when creating many small files or sparse files. For example, PL/I regional files are sparse and they may allocate more space on a 4 KB disk than on a 1 KB disk, therefore, the smaller BLKSIZE is preferable.
- If you have a minidisk defined as virtual device number 192, it may be automatically formatted
and accessed when you IPL CMS. If 192 is:
- An unformatted temporary minidisk or virtual disk in storage, CMS formats it and accesses it as file mode D.
- A CP-formatted temporary minidisk or virtual disk in storage, CMS reformats it for CMS use and accesses it as file mode D.
- A CMS-formatted temporary minidisk, virtual disk in storage, or permanent minidisk accessed as a file mode other than D, CMS reaccesses it as file mode D.
- An unformatted or CP-formatted permanent minidisk, CMS does not automatically format, reformat, access, or reaccess it.
When CMS accesses a 192 minidisk as file mode D, any minidisk or SFS directory already accessed as D is released.
- To format a DASD for correct Linux® usage, you must use either the CP CPFMTXA utility or the Device Support Facility. For more information, see z/VM®: CP Commands and Utilities Reference.
- Because the CMS file system requires file status and control information to reside below 16 MB in virtual storage, there is a practical limitation on the size of CMS minidisks. As a minidisk increases in size, or more files reside on the disk, the amount of virtual storage associated with the disk for CMS file system status and control increases in storage below 16 MB. The current ECKD DASD limitation is 65520 cylinders for a 3390 disk on an IBM® TotalStorage DASD subsystem, or about 45 GB of data. The maximum size for FBA SCSI disks supported for use by CMS or GCS is 381 GB. IBM suggests that customers defining disks for use by CMS should set a practical limit of about 22 GB. If larger disks are defined, they should be limited to contain very few files, or the CMS file system may not be able to obtain enough virtual storage below 16 MB to format or access those disks. For more information, see ACCESS.
Responses
DMS603R Format will erase all files on disk
mode(vdev).
Do you wish to continue? Enter 1 (YES) or 0 (NO).
DMS605R Enter disk label:DMS705I Disk remains unchangedDMS732I nnnn {cylinders|FB-512 blocks}
formatted on mode(vdev)DMS733I Formatting disk modeLABEL VDEV M STAT CYL TYPE BLKSZ FILES BLKS USED-(%) BLKS LEFT BLK TOTAL
label vdev m R/W nnnnn type nnnn nnnnnnnn nnnnnnnnnn-%% nnnnnnnnnn nnnnnnnnnn
This message provides the status of a disk when you use the RECOMP option. The response is the same as when you issue the QUERY command with the DISK operand.
Messages and Return Codes
- DMS003E Invalid option: option [RC=24]
- DMS005E No BLKSIZE specified [RC=24]
- DMS017E Invalid device address vdev [RC=24]
- DMS028E No device specified [RC=24]
- DMS037E Filemode mode[(vdev)] is accessed as read/only [RC=36]
- DMS048E Invalid filemode mode [RC=24]
- DMS069E Filemode mode not accessed [RC=36]
- DMS070E Invalid parameter parameter [RC=24]
- DMS109S Virtual storage capacity exceeded [RC=104]
- DMS113S Device vdev not attached [RC=100]
- DMS114S Device vdev is an unsupported device type, or requested BLKSIZE is not supported for the device [RC=88]
- DMS114S Device vdev too large for CMS use [RC=88]
- DMS125S Permanent unit check on disk mode(vdev) [RC=100]
- DMS126E Error writing label on disk mode(vdev) [RC=100]
- DMS214W Cannot recompute without loss of data; no change [RC=8]
- DMS216E Insufficient blocks on disk to support CMS disk structure [RC=100]
- DMS361E Disk mode(vdev) is not a CMS disk [RC=36]
Additional system messages may be issued by this command. The reasons for these messages and their location are:
| Reason | Location |
|---|---|
| Errors in command syntax | Command Syntax Error Messages |
