z/OS DFSMSdfp Advanced Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Retrieving Information by Data Set Name (LOCATE and CAMLST NAME)

z/OS DFSMSdfp Advanced Services
SC23-6861-01

Specifying a data set name returns a volume list in your output area. A volume list consists of an entry for each volume on which part of the data set resides. For each volume, the list contains the volume serial number, device type, and file sequence number. Volumes are divided by whether they fall within the minimum unit count, or outside of it. Volumes within and without are in descending binary order by device type, except for reusable KSDS. For a reusable KSDS, the volume serial numbers are returned in the order: first index, first data, remaining index, remaining data.

A volume list begins with a 2-byte field containing the number of volumes in the list. The count field is followed by a variable number of 12-byte entries. Each 12-byte entry consists of a 4-byte device code, a 6-byte volume serial number, and a 2-byte volume sequence number. As many as 20 of these 12-byte entries can be built in your output area. LOCATE can return bytes 252 - 254 of your area containing the relative track address of the DSCB on the first or only volume for that data set. Otherwise, these bytes are zero. Bytes 242 to 251 are reserved, byte 255 contains zeros, and bytes 256 to 264 are also reserved and not intended as a programming interface.

A CAMLST LOCATE on a VSAM cluster returns the volumes for all components. The format of this volume list is as described previously. The output is translated into the format described in the preceding two paragraphs before returning to the caller. The original VSAM or integrated catalog facility return code is saved in register 0.

The macro format for the LOCATE and CAMLST NAME is:

Read syntax diagramSkip visual syntax diagram
>>-+-------+--LOCATE--listname_addrx---------------------------><
   '-label-'                           

Read syntax diagramSkip visual syntax diagram
>>-listname--CAMLST--NAME--,dsname_relexp--,area_relexp--------><

listname_addrx
Points to the parameter list (labeled listname) set up by the CAMLST macro instruction.
NAME
To retrieve information from a catalog by name, code this operand as shown.
dsname_relexp
Specifies the virtual storage location of a fully-qualified data set name. The area that contains the name must be 44 bytes long. The name can be defined by a C-type define constant (DC) instruction.
area_relexp
Specifies the virtual storage location of your 265-byte output area, that you must define. The output area must begin on a doubleword boundary.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014