Interface IGenerationDataGroup

  • All Superinterfaces:
    IHostResource

    public interface IGenerationDataGroup
    extends IHostResource
    A generation data group that resides on a z/OS host.

    For details on the state of an IGenerationDataGroup and the function of its methods, see IHostResource.

    Examples:
    To define a generation data group:

     IDataSetCommandProvider commandProvider = ...
     String generationDataGroupName = ...
     IDefineGenerationDataGroupParameters parameters = ...
     
     try {
         commandProvider.defineGenerationDataGroup(generationDataGroupName,
                 parameters);
     } catch (GenerationDataGroupExistsException e) {
         // the generation data group (or a like-named dataset) already
         // exists
         ...
     } catch (DefinitionFailedException e) {
         // the definition failed - most likely because the user does not
         // have the proper authority
         ...
     }
     
    (Note: the above catch blocks can be replaced with a single catch block on HostResourceException.)

    (Note: see DefineGenerationDataGroupParametersBuilder for examples of building define generation data group parameters.)

    To retrieve a generation data group:

     IDataSetCommandProvider commandProvider = ...
     String generationDataGroupName = ...
     
     // generationDataGroup will be null if it cannot be found
     IGenerationDataGroup generationDataGroup = commandProvider
             .findGenerationDataGroup(generationDataGroupName);
     
    To retrieve a list of generation data groups matching a filter:
     IDataSetCommandProvider commandProvider = ...
     String generationDataGroupFilter = ...
     
     // generationDataGroups will be empty if no generation data groups match
     // the generation data group filter
     List<IGenerationDataGroup> generationDataGroups = commandProvider
             .findGenerationDataGroups(generationDataGroupFilter);
     
    For examples on how to obtain an IDataSetCommandProvider, see IDataSetCommandProvider.
    For examples on how to retrieve generation datasets, typed as an IDataSet, see IDataSet.
    For examples on how to retrieve generation datasets, typed as an ISequentialDataSet, see ISequentialDataSet.
    Since:
    2.1.0
    Version:
    2.1.0
    Restriction:
    This interface is not intended to be extended by clients.
    Restriction:
    This interface is not intended to be implemented by clients.
    • Method Detail

      • getType

        GenerationDataGroupType getType()
        Returns the type of this host resource.

        Note: the value returned from this method represents the state of this host resource from the time it was retrieved from the host. Any changes made to this host resource since it was retrieved will not be reflected in this method.

        Specified by:
        getType in interface IHostResource
        Returns:
        the member type
        Since:
        2.1.0
      • findGenerationDataSet

        IDataSet findGenerationDataSet​(int relativeGenerationNumber)
        Returns a specific generation dataset from this generation data group if it can be found on the associated z/OS host.

        The relative generation number must be between 0 and -999 (inclusive), with 0 being the current generation and negative numbers referencing previous generations.

        Reasons this method may return null include:

        • A generation dataset for the specified relative generation number does not exist
        To retrieve the full list of currently allocated generation datasets for, see fetchGenerationDataSets().
        To retrieve a generation dataset for a specific generation, typed as an ISequentialDataSet, see findGenerationSequentialDataSet(int).
        Parameters:
        relativeGenerationNumber - the relative generation number
        Returns:
        the generation dataset, or null if the generation dataset could not be found
        Throws:
        IllegalArgumentException - if relativeGenerationNumber is outside the range of 0 through -999
        ZOSSystemException - if a z/OS system error occurs
        ZOSAbendException - if a z/OS ABEND occurs
        Since:
        2.1.0
        See Also:
        fetchGenerationDataSets(), findGenerationSequentialDataSet(int)
      • findGenerationSequentialDataSet

        ISequentialDataSet findGenerationSequentialDataSet​(int relativeGenerationNumber)
        Returns a specific generation dataset, typed as an ISequentialDataSet, from this generation data group if it can be found on the associated z/OS host.

        The relative generation number must be between 0 and -999 (inclusive), with 0 being the current generation and negative numbers referencing previous generations.

        Reasons this method may return null include:

        • A generation dataset for the specified relative generation number does not exist
        • The generation dataset is not a sequential dataset
        • The generation dataset is migrated
        To retrieve the full list of currently allocated generation datasets for a generation data group, see fetchGenerationDataSets().
        To retrieve a generation dataset for a specific generation, typed as an IDataSet, see findGenerationDataSet(int).
        Parameters:
        relativeGenerationNumber - the relative generation number
        Returns:
        the generation dataset, or null if the generation dataset could not be found or is not a sequential dataset
        Throws:
        IllegalArgumentException - if relativeGenerationNumber is outside the range of 0 through -999
        ZOSSystemException - if a z/OS system error occurs
        ZOSAbendException - if a z/OS ABEND occurs
        Since:
        2.1.0
        See Also:
        fetchGenerationDataSets(), findGenerationDataSet(int)