ZVOLLIST Function: z/OS

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

Syntax

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

Required Argument

category
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.
option
this parameter is supported, but no values are currently processed.

Details

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

Example

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