Module ibm.jzos
Package com.ibm.jzos

Class DatasetVolumeList

java.lang.Object
com.ibm.jzos.DatasetVolumeList

public class DatasetVolumeList extends Object
An object which maps the 265-byte workarea returned by the LOCATE macro, preceded by the 44-byte resolved dataset name.

Since:
2.1.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The buffer length
    static final int
    The maximum number of volume entries
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct an instance
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Answer the underlying byte array mapped by this object.
    int[]
    Answer an array of ints, each containing the 4-byte device type of the corresponding volume entry.
    Answer a String containing the DSN returned from the LOCATE macro.
    int
    Answer the total number of volume entries found in the catalog.
    Answer a String array containing the volume serial numbers.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • BUF_LEN

      public static final int BUF_LEN
      The buffer length
      See Also:
    • MAX_ENTRIES

      public static final int MAX_ENTRIES
      The maximum number of volume entries
      See Also:
  • Constructor Details

    • DatasetVolumeList

      public DatasetVolumeList()
      Construct an instance
  • Method Details

    • getBytes

      public byte[] getBytes()
      Answer the underlying byte array mapped by this object.
      Returns:
      byte[]
    • getTotalVolumesCount

      public int getTotalVolumesCount()
      Answer the total number of volume entries found in the catalog. Note that only the first 20 volume entries are actually returned by LOCATE/CAMLST in this object.
    • getDeviceTypes

      public int[] getDeviceTypes()
      Answer an array of ints, each containing the 4-byte device type of the corresponding volume entry. Only the first 20 entries are returned, up to the size given by getTotalVolumesCount().
      See Also:
    • getVolumes

      public String[] getVolumes()
      Answer a String array containing the volume serial numbers. Only the first 20 volume names are returned, up to the size given by getTotalVolumesCount().
      See Also:
    • getReturnedDSN

      public String getReturnedDSN()
      Answer a String containing the DSN returned from the LOCATE macro. This is generally the same as the input DSN, but in some circumstances, such as lookups of alias names or relative GDG names, it will return a different DSN.
      Returns:
      String the DSN, with trailing blanks trimmed.