ZVOLLIST Function: z/OS

Returns a list of volume serial numbers.
Category: External Files
z/OS specifics: info-item


ZVOLLIST(category, <volume filter>, <option>);

Required Argument

can be a device type (for example, 3390) or a device name (for example, SYSDA). If ALL or DASD are specified, then all volume serial numbers for all direct access device names are returned.

Optional Arguments

volume filter
returns all volume serial numbers for the specified category if a NULL volume filter is specified. A volume serial number can be a six-character value (for example, SDS001), or a wildcard (for example, SDS*). If a wildcard is specified, then all volume serial numbers beginning with SDS for the specified category are returned. The volume filter might be a list (for example, SDS001, SMS*, APP0*). The first character of the filter cannot be a blank space. If it is, then the filter is assumed to be NULL.
this parameter is supported, but no values are currently processed.


Use the following method to invoke the ZVOLLIST function:
length xvols $1024;
xvols=zvollist(category, volume filter, option);


length xvols $32000;
length unitnm vfilter $24;
unitnm = ‘3390’;
vfilter = ‘ ‘;
xvols=zvollist(unitnm, vfilter);
xvols=zvollist(‘SYSDA”, vfilter)’
vfilter = ‘SDS011,SDS012’;
unitnm = ‘ALL’;
vfilter = ‘SMF*, SMS*’;
xvols=zvollist(unitnm, vfilter);
vfilter = ‘&sysr1, &sysr2’;
The output format of the ZVOLLIST function is a list of volume serial numbers that are separated by commas and sorted into alphanumeric order.