Previous Topic: D2P()Next Topic: DB2()


DASD()

This function returns information about specified DASD devices.

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}

Parameters

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 the largest contiguous group

ltrk

Number of free tracks contiguous with largest free area

SPACE

Returns information about 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 the operating system assigns. 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.

Return Codes

101 - 103

ARG n MISSING OR INVALID

121

SPECIFIED VOLUME NOT FOUND

122

UNIT ADDRESS NOT VALID

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 */