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:
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
Returns information on the amount of free space remaining on the volume or device.
Indicates that the third argument specifies a volume serial number.
Volume serial number (volume label) of a DASD device.
Indicates that the third argument specifies a unit address.
Numeric unit name assigned by the operating system. This is the decimal equivalent of the value.
Returns the physical device address (unit address) of the device bearing the specified volume serial number (volume label).
Returns the volume serial number (volume label) associated with the specified physical device address.
Memory address of the unit control block (UCB) assigned to the DASD device. The address is returned as a decimal number.
Returns the memory address of the unit control block assigned to the volume or device.
The DASD() function produces these return codes:
ARG n MISSING OR INVALID
SPECIFIED VOLUME NOT FOUND
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 © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |