Use the DASD() function to return information about specified DASD devices.
The DASD() function has this syntax:
Form 1:
space = DASD(SPACE,{VOLUME,volser})
{UNIT,unitname}
Form 2:
unitname = DASD(VOL2UNIT,volser)
Form 3:
volser = DASD(UNIT2VOL,unitname)
Form 4:
ucb = DASD(UCB,{VOLUME,volser})
{UNIT,unitname}
The DASD() function takes these arguments:
|
space |
Amount of free space on the DASD. The result string has the following format: SPACE fcyl ftrk ext lcyl ltrk fcyl Total free cylinders ftrk Total free tracks on partial cylinders ext Total free extents lcyl Number of cylinders in largest contiguous group ltrk Number of free tracks contiguous with largest free area |
|
SPACE |
Returns information on the amount of free space remaining on the volume or device. |
|
VOLUME |
Indicates that the third argument specifies a volume serial number. |
|
volser |
Volume serial number (volume label) of a DASD device. |
|
UNIT |
Indicates that the third argument specifies a unit address. |
|
unitname |
Numeric unit name assigned by the operating system. This is the decimal equivalent of the value. |
|
VOL2UNIT |
Returns the physical device address (unit address) of the device bearing the specified volume serial number (volume label). |
|
UNIT2VOL |
Returns the volume serial number (volume label) associated with the specified physical device address. |
|
ucb |
Memory address of the unit control block (UCB) assigned to the DASD device. The address is returned as a decimal number. |
|
UCB |
Returns the memory address of the unit control block assigned to the volume or device. |
The DASD() function produces these return codes:
101 - 103 ARG n MISSING OR INVALID
121 SPECIFIED VOLUME NOT FOUND
122 UNIT ADDRESS NOT VALID
Example
Consider this example:
unit = dasd('VOL2UNIT','mvs101') /* Determine unit name
containing MVS101 */
volser = dasd('UNIT2VOL',x2d(152)) /* Determine volser
currently on unit 152 */
ucb = dasd('UCB','UNIT',x2d(152)) /* Obtain memory address of
UCB for unit 152 */
ucb = dasd('UCB','VOLUME','mvs101') /* Obtain memory address of
UCB for volume MVS101 */
space = dasd('SPACE','UNIT',x2d(152)) /* Determine free space on
unit 152 */
space = dasd('SPACE','VOLUME','mvs101') /* Determine free space on
volume MVS101 */
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |