VDISK (Define Virtual Disk)

The VDISK statement or command creates and initializes a virtual disk.

The virtual disk must have been defined at IPL time with the ADD (FBAV) command and virtual storage limits for the virtual disk must have been defined with the SYSDEF command. VDISK creates either a shared memory object or a data space for each virtual disk. If there is enough space in the extended shared area, a memory object is created, if not a data space is created. The total amount of virtual storage available for shared memory objects is defined through SYSDEF MEMOBJ SHRLIMIT and can be displayed with QUERY MEMOBJ. The total amount of virtual storage available for data spaces is defined through SYSDEF DSPACE DSIZE and can be displayed with QUERY DSPACE.

The memory object or data space containing the virtual disk is initialized to zero and a VTOC is set up indicating an empty disk. The job control command or statement can be entered in the BG partition only, but at any time. If the BG partition has been allocated using multiple-partition allocation (for example during IPL, when $0JCL.PROC gets control), VDISK always creates a data space, no matter whether there is space in the extended shared area or not.

The VDISK command can define virtual disks on memory objects only when it is entered in the BG partition allocated using single-partition allocation. This is caused by a restriction of the IARV64 macro, which is used to define a shared memory object.

JCC, JCS Format

Read syntax diagramSkip visual syntax diagram//VDISK UNIT= cuu,BLKS= n,VOLID=VDIcuu,VOLID= volser,VTOC=64,VTOC= v,USAGE=DLA

Parameters

UNIT=cuu
Specifies the device number to be used for the virtual disk.
BLKS=n
Specifies the size of the virtual disk as a number of 512-byte blocks.
  • n can be in a range from 0 - 8,388,480, if the virtual disk is to be allocated in a memory object.
  • n can be in a range from 0 - 4,194,240, if the virtual disk is to be allocated in a data space.

    Because only a multiple of 960 is used as the number of FBA blocks, the specified number is rounded up to a multiple of 960. For example, if you specify 100, 960 blocks are made available.

    Maximal 2 GB of storage can be allocated to a data space, therefore the largest multiple of 960 that results in a data space of less than 2 GB is 4,194,240. If you do not want to calculate a multiple of 960, just enter a number that suits your needs and get the exact capacity of the virtual disk using the VOLUME command.

A DVCUP command is implicitly issued after VDISK has been specified with BLKS not equal to zero.

A specification of BLKS=0 indicates that the virtual disk is no longer to be used and the data space or memory object is to be deallocated. A value of 0 can be specified only, if a device is no longer available for system operation, which requires to use the DVCDN command first. The VOLID and VTOC operands are ignored, if specified after BLKS=0.

VOLID=volser
Specifies the volume serial number of the virtual disk, which can be one to six alphanumeric characters. If fewer than six characters are used, the field is padded on the left with zeros, unless you enclose it in quotes, in which case it is padded on the right with blank characters. A field enclosed in quotes must not contain blanks or be empty.

If you do not specify the VOLID operand, the volume serial number is defaulted to VDIcuu.

VTOC=v
Specifies the number of 512-byte blocks allocated for the VTOC, which is always put at the end of the virtual disk. For v, specify 1 - 3 decimal digits (from 1 - 999). The specified number is rounded to a multiple of eight, because the control-interval size (CISIZE) for the VTOC is 4 KB.

For each file on the virtual disk and for each additional extent of a file, one label record is written into the VTOC. 28 label records can be written into one control interval of 4 KB size. Thus, for every 28 label records, eight 512-byte blocks have to be allocated.

If the VTOC operand is omitted, the default VTOC has the following characteristics:
  • Number of 512-byte blocks: 64, which means 8*28=224 label records can be written into the VTOC.
  • Starting location of VTOC: block n minus 65, where n is the number of blocks made available in the BLKS operand.
USAGE=DLA
Specifies that the virtual disk being defined is to hold the label area, which is allocated on data space only. The system allocates space for the new (empty) label area starting after the VOL1 label (two 512-byte blocks) of the virtual disk. The VTOC is located at the end of the virtual disk. If the VTOC operand has been omitted, the minimum size (eight 512-byte blocks) is allocated for the VTOC. USAGE=DLA can only be used during ASI (Automated System Initialization) and if no other partitions except BG have been started. It is to be used before any DLBL statements are processed. Up to 2880 blocks can be allocated for the label area. This corresponds to the same capacity as for the label area on a CKD disk. For further capacity considerations refer to Label Area on Virtual Disk.