Interface IDataSetCommandProvider
-
public interface IDataSetCommandProvider
Command provider for datasets.Regarding parameter validation for the methods within this class:
A dataset name is considered invalid if:
- The total length of the name is 0 or is greater than 44 characters.
- The length of any qualifier within the name is 0 or is greater than 8 characters.
- Qualifiers are delimited by anything other than a '.' character.
- Any characters outside of the code page 1047 hex values for A-Z, a-z, 0-9, @, #, $, or - are present.
- Any qualifier (and hence the name itself) starts with a digit (0-9) or a hyphen (-).
A PDS member name is considered invalid if:
- The length of the name is 0 or is greater than 8 characters.
- Any characters outside of the code page 1047 hex values for A-Z, a-z, 0-9, @, #, or $ are present.
- The name starts with a digit (0-9).
A dataset filter defines the level qualifiers for the datasets to be included in the returned list. Qualifiers can be specified fully or partially. At least one qualifier must be partially specified. A filter of '*' or '**' or any combination of '*' and '**' qualifiers is invalid. Dataset name qualifiers can be partially specified using asterisks as global file-name characters and percent signs as placeholders.
The following rules apply when determining whether a dataset filter is valid:
- * - A single asterisk by itself indicates that at least one qualifier is needed to occupy that position. A single asterisk within a qualifier indicates that zero or more characters can occupy that position.
- ** - A double asterisk indicates that zero or more qualifiers can occupy that position. A double asterisk within a qualifier is invalid.
- % - A single percent sign indicates that any one single alphanumeric or national character can occupy that position.
- %%... - One to eight percent signs can be specified in each qualifier.
The following rules apply when determining whether a PDS member filter is valid:
- * - A single asterisk indicates that zero or more characters can occupy that position.
- **... - Multiple asterisks can be specified, but sequential asterisks are treated as a single asterisk.
- % - A single percent sign indicates that any one single alphanumeric or national character can occupy that position.
- %%... - One to eight percent signs can be specified.
Examples:
To obtain anIDataSetCommandProvider
:IZOSHostConnection zosHostConnection = ... // get the dataset command provider from a z/OS host connection // note: the command provider will only be usable while the z/OS host // connection is connected to its z/OS host IDataSetCommandProvider commandProvider = zosHostConnection .getDataSetCommandProvider();
To copy a PDS member:IZOSHostConnection zosHostConnection = ... IDataSetCommandProvider commandProvider = zosHostConnection .getDataSetCommandProvider(); String sourcePDS = ... String sourceMember = ... String targetPDS = ... String targetMember = ... boolean replace = ... commandProvider.copyPDSMember(sourcePDS, sourceMember, targetPDS, targetMember, replace);
For examples on how to connect to a z/OS host with anIZOSHostConnection
, seeIZOSHostConnection
.
For examples on how to retrieveIDataSet
s, seeIDataSet
.
For examples on how to deleteIDataSet
s, seeIDataSet
.
For examples on how to allocateIPartitionedDataSet
s, seeIPartitionedDataSet
.
For examples on how to allocateISequentialDataSet
s, seeISequentialDataSet
.
For examples on how to create or retrieveIPartitionedDataSetMember
s, seeIPartitionedDataSetMember
.
For examples on how to define or retrieveIGenerationDataGroup
s, seeIGenerationDataGroup
.- Since:
- 1.0.0
- Version:
- 2.5.0
- See Also:
IZOSHostConnection
,IDataSet
,IMigratedDataSet
,IPartitionedDataSet
,ISequentialDataSet
,IVSAMCluster
,IPartitionedDataSetMember
,IGenerationDataGroup
- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
allocatePartitionedDataSet(String dataSetName, IAllocateParameters parameters)
Allocates a partitioned dataset with the specified name and parameters on the associated z/OS host.void
allocateSequentialDataSet(String dataSetName, IAllocateParameters parameters)
Allocates a sequential dataset with the specified name and parameters on the associated z/OS host.void
copyPDSMember(String sourceDataSet, String sourceMember, String targetDataSet, String targetMember, boolean replace)
Copies a PDS member from the source PDS to the target PDS with the target member name.void
createPDSMember(String pdsName, String memberName)
Creates a partitioned dataset member with the given name within the specified partitioned dataset name on the associated z/OS host.void
defineGenerationDataGroup(String generationDataGroupName, IDefineGenerationDataGroupParameters parameters)
Defines a generation data group with the specified name and parameters on the associated z/OS host.void
deleteDataSet(String dataSetName)
Deletes a dataset with the given name from the associated z/OS host.void
deletePDSMember(String pdsName, String memberName)
Deletes a partitioned dataset member with the given member name from the specified partitioned datasetList<IDataSet>
fetchGenerationDataSets(String generationDataGroupName)
Returns a list of all generation datasets from the specified generation data group on the associated z/OS host.IDataSet
findDataSet(String dataSetName)
Returns the dataset with the specified name if it can be found on the associated z/OS host.List<IDataSet>
findDataSets(String dataSetFilter)
Returns the list of datasets that match the specified filter on the associated z/OS host.List<IDataSet>
findDataSets(String dataSetFilter, DataSetType... dataSetTypes)
Returns the list of datasets of the specified type(s) that match the specified filter on the associated z/OS host.IGenerationDataGroup
findGenerationDataGroup(String generationDataGroupName)
Returns the generation data group with the specified name if it can be found on the associated z/OS host.List<IGenerationDataGroup>
findGenerationDataGroups(String generationDataGroupFilter)
Returns the list of generation data groups that match the specified filter on the associated z/OS host.IDataSet
findGenerationDataSet(String generationDataGroupName, int relativeGenerationNumber)
Returns a specific generation dataset from the specified generation data group if it can be found on the associated z/OS host.ISequentialDataSet
findGenerationSequentialDataSet(String generationDataGroupName, int relativeGenerationNumber)
Returns a specific generation dataset, typed as anISequentialDataSet
, from the specified generation data group if it can be found on the associated z/OS host.IMigratedDataSet
findMigratedDataSet(String migratedDataSetName)
Returns the migrated dataset with the specified name if it can be found on the associated z/OS host.List<IMigratedDataSet>
findMigratedDataSets(String dataSetFilter)
Returns the list of migrated datasets that match the specified filter on the associated z/OS host.IPartitionedDataSet
findPartitionedDataSet(String pdsName)
Returns the partitioned dataset with the specified name if it can be found on the associated z/OS host.List<IPartitionedDataSet>
findPartitionedDataSets(String dataSetFilter)
Returns the list of partitioned datasets that match the specified filter on the associated z/OS host.IPartitionedDataSetMember
findPDSMember(String pdsName, String memberName)
Returns the partitioned dataset member with the specified partitioned dataset name and member name, if it can be found on the associated z/OS host.List<IPartitionedDataSetMember>
findPDSMembers(String pdsName, String memberFilter)
Returns the list of partitioned dataset members that match the specified partitioned dataset name and member filter on the associated z/OS host.ISequentialDataSet
findSequentialDataSet(String sequentialDataSetName)
Returns the sequential dataset with the specified name if it can be found on the associated z/OS host.List<ISequentialDataSet>
findSequentialDataSets(String dataSetFilter)
Returns the list of sequential datasets that match the specified filter on the associated z/OS host.IVSAMCluster
findVSAMCluster(String vsamClusterName)
Returns the VSAM cluster with the specified name if it can be found on the associated z/OS host.List<IVSAMCluster>
findVSAMClusters(String dataSetFilter)
Returns the list of VSAM clusters that match the specified filter on the associated z/OS host.IZOSHostConnection
getZOSHostConnection()
Returns the z/OS host connection associated with this command provider.boolean
isGenerationDataGroupsSupported()
Returns if the associated z/OS host supports the generation data group methods of thisIDataSetCommandProvider
.
-
-
-
Method Detail
-
getZOSHostConnection
IZOSHostConnection getZOSHostConnection()
Returns the z/OS host connection associated with this command provider.- Returns:
- the z/OS host connection
- Since:
- 1.0.0
-
createPDSMember
void createPDSMember(String pdsName, String memberName) throws DataSetAccessException, DataSetInUseException, DataSetMigratedException, DataSetNotFoundException, MemberAlreadyExistsException
Creates a partitioned dataset member with the given name within the specified partitioned dataset name on the associated z/OS host.- Parameters:
pdsName
- the name of the partitioned datasetmemberName
- the name of the member- Throws:
IllegalArgumentException
- ifpdsName
isnull
or invalid, or ifmemberName
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursDataSetAccessException
- if the user's credentials do not grant access authority for the partitioned datasetDataSetInUseException
- if an exclusive enqueue exists on the partitioned datasetDataSetMigratedException
- if the partitioned dataset is migratedDataSetNotFoundException
- if the partitioned dataset does not existMemberAlreadyExistsException
- if a member with the same name already exists- Since:
- 1.1.0
-
deletePDSMember
void deletePDSMember(String pdsName, String memberName) throws DataSetAccessException, DataSetInUseException, DataSetMigratedException, DataSetNotFoundException, MemberInUseException, MemberNotFoundException
Deletes a partitioned dataset member with the given member name from the specified partitioned dataset- Parameters:
pdsName
- the name of the partitioned datasetmemberName
- the name of the member to delete- Throws:
IllegalArgumentException
- ifpdsName
isnull
or invalid, or ifmemberName
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursDataSetAccessException
- if the user's credentials do not grant access authority for the partitioned datasetDataSetInUseException
- if an exclusive enqueue exists on the partitioned datasetDataSetMigratedException
- if the partitioned dataset is migratedDataSetNotFoundException
- if the partitioned dataset does not existMemberInUseException
- if an exclusive enqueue exists on the memberMemberNotFoundException
- if the member does not exist- Since:
- 1.1.0
-
deleteDataSet
void deleteDataSet(String dataSetName) throws DataSetAccessException, DataSetInUseException, DataSetNotFoundException
Deletes a dataset with the given name from the associated z/OS host.- Parameters:
dataSetName
- the name of the dataset- Throws:
DataSetAccessException
- if the user's credentials do not grant access authority for the datasetDataSetInUseException
- if an exclusive enqueue exists on the partitioned datasetDataSetNotFoundException
- if the dataset does not exist- Since:
- 2.2.0
-
copyPDSMember
void copyPDSMember(String sourceDataSet, String sourceMember, String targetDataSet, String targetMember, boolean replace) throws DataSetAccessException, DataSetInUseException, DataSetMigratedException, DataSetNotFoundException, MemberAlreadyExistsException, MemberNotFoundException, DataSetOutOfSpaceException
Copies a PDS member from the source PDS to the target PDS with the target member name.- Parameters:
sourceDataSet
- the name of the source dataset (PDS or PDSE)sourceMember
- the name of the source membertargetDataSet
- the name of the target dataset (PDS or PDSE)targetMember
- the name of the target memberreplace
- true to replace an existing member with the same name, else false- Throws:
IllegalArgumentException
- if either pdsName isnull
or invalid, or if either memberName isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursDataSetAccessException
- if the user's credentials do not grant access authority for the partitioned datasetDataSetInUseException
- if an exclusive enqueue exists on the partitioned datasetDataSetMigratedException
- if the partitioned dataset is migratedDataSetNotFoundException
- if the partitioned dataset does not existDataSetOutOfSpaceException
- if the target dataset is out of spaceMemberNotFoundException
- if the member does not existMemberAlreadyExistsException
- if the target member already exists and the replace flag is false- Since:
- 2.5.0
-
findDataSet
IDataSet findDataSet(String dataSetName)
Returns the dataset with the specified name if it can be found on the associated z/OS host.- Parameters:
dataSetName
- the name of the dataset- Returns:
- the dataset, or
null
if the dataset could not be found - Throws:
IllegalArgumentException
- ifdataSetName
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occurs- Since:
- 1.0.0
-
findDataSets
List<IDataSet> findDataSets(String dataSetFilter)
Returns the list of datasets that match the specified filter on the associated z/OS host.An empty list will be returned if no datasets match the specified filter.
For the rules of a valid dataset filter, see
IDataSetCommandProvider
.- Parameters:
dataSetFilter
- the dataset filter- Returns:
- the list of matching datasets
- Throws:
IllegalArgumentException
- ifdataSetFilter
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occurs- Since:
- 1.0.0
-
findDataSets
List<IDataSet> findDataSets(String dataSetFilter, DataSetType... dataSetTypes)
Returns the list of datasets of the specified type(s) that match the specified filter on the associated z/OS host.An empty list will be returned if no datasets of the specified types match the specified filter.
For the rules of a valid dataset filter, see
IDataSetCommandProvider
.- Parameters:
dataSetFilter
- the dataset filterdataSetTypes
- the dataset types to return, ornull
to return all types of datasets- Returns:
- the list of matching datasets
- Throws:
IllegalArgumentException
- ifdataSetFilter
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occurs- Since:
- 1.0.0
-
findMigratedDataSet
IMigratedDataSet findMigratedDataSet(String migratedDataSetName)
Returns the migrated dataset with the specified name if it can be found on the associated z/OS host.- Parameters:
migratedDataSetName
- the name of the migrated dataset- Returns:
- the migrated dataset, or
null
if the migrated dataset could not be found - Throws:
IllegalArgumentException
- ifmigratedDataSetName
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occurs- Since:
- 1.0.0
-
findMigratedDataSets
List<IMigratedDataSet> findMigratedDataSets(String dataSetFilter)
Returns the list of migrated datasets that match the specified filter on the associated z/OS host.An empty list will be returned if no migrated datasets match the specified filter.
For the rules of a valid dataset filter, see
IDataSetCommandProvider
.- Parameters:
dataSetFilter
- the dataset filter- Returns:
- the list of matching migrated datasets
- Throws:
IllegalArgumentException
- ifdataSetFilter
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occurs- Since:
- 1.0.0
-
findPartitionedDataSet
IPartitionedDataSet findPartitionedDataSet(String pdsName)
Returns the partitioned dataset with the specified name if it can be found on the associated z/OS host.- Parameters:
pdsName
- the name of the partitioned dataset- Returns:
- the partitioned dataset, or
null
if the partitioned dataset could not be found - Throws:
IllegalArgumentException
- ifpdsName
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occurs- Since:
- 1.0.0
-
findPartitionedDataSets
List<IPartitionedDataSet> findPartitionedDataSets(String dataSetFilter)
Returns the list of partitioned datasets that match the specified filter on the associated z/OS host.An empty list will be returned if no partitioned datasets match the specified filter.
For the rules of a valid dataset filter, see
IDataSetCommandProvider
.- Parameters:
dataSetFilter
- the dataset filter- Returns:
- the list of matching partitioned datasets
- Throws:
IllegalArgumentException
- ifdataSetFilter
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occurs- Since:
- 1.0.0
-
findSequentialDataSet
ISequentialDataSet findSequentialDataSet(String sequentialDataSetName)
Returns the sequential dataset with the specified name if it can be found on the associated z/OS host.- Parameters:
sequentialDataSetName
- the name of the sequential dataset- Returns:
- the sequential dataset, or
null
if the sequential dataset could not be found - Throws:
IllegalArgumentException
- ifsequentialDataSetName
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occurs- Since:
- 1.0.0
-
findSequentialDataSets
List<ISequentialDataSet> findSequentialDataSets(String dataSetFilter)
Returns the list of sequential datasets that match the specified filter on the associated z/OS host.An empty list will be returned if no sequential datasets match the specified filter.
For the rules of a valid dataset filter, see
IDataSetCommandProvider
.- Parameters:
dataSetFilter
- the dataset filter- Returns:
- the list of matching sequential datasets
- Throws:
IllegalArgumentException
- ifdataSetFilter
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occurs- Since:
- 1.0.0
-
findVSAMCluster
IVSAMCluster findVSAMCluster(String vsamClusterName)
Returns the VSAM cluster with the specified name if it can be found on the associated z/OS host.- Parameters:
vsamClusterName
- the name of the VSAM cluster- Returns:
- the VSAM cluster, or
null
if the VSAM cluster could not be found - Throws:
IllegalArgumentException
- ifvsamClusterName
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occurs- Since:
- 1.0.0
-
findVSAMClusters
List<IVSAMCluster> findVSAMClusters(String dataSetFilter)
Returns the list of VSAM clusters that match the specified filter on the associated z/OS host.An empty list will be returned if no VSAM clusters match the specified filter.
For the rules of a valid dataset filter, see
IDataSetCommandProvider
.- Parameters:
dataSetFilter
- the dataset filter- Returns:
- the list of matching VSAM clusters
- Throws:
IllegalArgumentException
- ifdataSetFilter
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occurs- Since:
- 1.0.0
-
findPDSMember
IPartitionedDataSetMember findPDSMember(String pdsName, String memberName) throws DataSetAccessException, DataSetInUseException, DataSetMigratedException, DataSetNotFoundException
Returns the partitioned dataset member with the specified partitioned dataset name and member name, if it can be found on the associated z/OS host.- Parameters:
pdsName
- the name of the partitioned datasetmemberName
- the name of the member- Returns:
- the partitioned dataset member, or
null
if the member could not be found - Throws:
IllegalArgumentException
- ifpdsName
isnull
or invalid, or ifmemberName
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursDataSetAccessException
- if the user's credentials do not grant access authority for the partitioned datasetDataSetInUseException
- if an exclusive enqueue exists on the partitioned datasetDataSetMigratedException
- if the partitioned dataset is migratedDataSetNotFoundException
- if the partitioned dataset does not exist- Since:
- 1.0.0
-
findPDSMembers
List<IPartitionedDataSetMember> findPDSMembers(String pdsName, String memberFilter) throws DataSetAccessException, DataSetInUseException, DataSetMigratedException, DataSetNotFoundException
Returns the list of partitioned dataset members that match the specified partitioned dataset name and member filter on the associated z/OS host.A
null
member filter can be specified to return all members.An empty list will be returned if no partitioned dataset members match the specified partitioned dataset name and member filter.
For the rules of a valid member filter, see
IDataSetCommandProvider
.- Parameters:
pdsName
- the name of the partitioned datasetmemberFilter
- the member filter, ornull
to return all members- Returns:
- the list of matching partitioned dataset members
- Throws:
IllegalArgumentException
- ifpdsName
isnull
or invalid, or ifmemberFilter
is invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursDataSetAccessException
- if the user's credentials do not grant access authority for the partitioned datasetDataSetInUseException
- if an exclusive enqueue exists on the partitioned datasetDataSetMigratedException
- if the partitioned dataset is migratedDataSetNotFoundException
- if the partitioned dataset does not exist- Since:
- 1.0.0
-
allocatePartitionedDataSet
void allocatePartitionedDataSet(String dataSetName, IAllocateParameters parameters) throws DataSetExistsException, AllocationFailedException
Allocates a partitioned dataset with the specified name and parameters on the associated z/OS host.The allocate parameters should be created using
AllocateParametersBuilder
. See that class for detailed information on building allocate parameters.- Parameters:
dataSetName
- the dataset nameparameters
- the allocate parameters- Throws:
IllegalArgumentException
- ifdataSetName
isnull
or invalid, orparameters
isnull
ZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursDataSetExistsException
- if the dataset already existsAllocationFailedException
- if the allocation fails on the z/OS host (likely caused by the user's credentials not having the authority to create this partitioned dataset)- Since:
- 1.1.0
- See Also:
AllocateParametersBuilder
-
allocateSequentialDataSet
void allocateSequentialDataSet(String dataSetName, IAllocateParameters parameters) throws DataSetExistsException, AllocationFailedException
Allocates a sequential dataset with the specified name and parameters on the associated z/OS host.The allocate parameters should be created using
AllocateParametersBuilder
. See that class for detailed information on building allocate parameters.- Parameters:
dataSetName
- the dataset nameparameters
- the allocate parameters- Throws:
IllegalArgumentException
- ifdataSetName
isnull
or invalid, orparameters
isnull
ZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursDataSetExistsException
- if the dataset already existsAllocationFailedException
- if the allocation fails on the z/OS host (likely caused by the user's credentials not having the authority to create this sequential dataset)- Since:
- 1.1.0
- See Also:
AllocateParametersBuilder
-
isGenerationDataGroupsSupported
boolean isGenerationDataGroupsSupported()
Returns if the associated z/OS host supports the generation data group methods of thisIDataSetCommandProvider
.Only hosts with CSS API versions of 18.02.18 or greater support the following methods:
defineGenerationDataGroup(String, IDefineGenerationDataGroupParameters)
fetchGenerationDataSets(String)
findGenerationDataGroup(String)
findGenerationDataGroups(String)
findGenerationDataSet(String, int)
findGenerationSequentialDataSet(String, int)
Attempts to use any of the above methods on hosts with a lower CSS API version will result in a
MethodNotSupportedException
.This method should be used to avoid calling the above methods, when it is not known if the host will have a CSS API version of 18.02.18 or above.
Example:
IDataSetCommandProvider commandProvider = ... IDefineGenerationDataGroupParameters parameters = ... if (commandProvider.isGenerationDataGroupsSupported()) { commandProvider.defineGenerationDataGroup("MY.GDG", parameters); } else { System.out.println("Sorry, this feature is not supported on this host."); }
- Returns:
true
if the host supports the generation data group methods, otherwisefalse
- Since:
- 2.1.0
-
defineGenerationDataGroup
void defineGenerationDataGroup(String generationDataGroupName, IDefineGenerationDataGroupParameters parameters) throws GenerationDataGroupExistsException, DefinitionFailedException
Defines a generation data group with the specified name and parameters on the associated z/OS host.The define generation data group parameters should be created using
DefineGenerationDataGroupParametersBuilder
. See that class for detailed information on building define generation data group parameters.- Parameters:
generationDataGroupName
- the define generation data group nameparameters
- the define generation data group parameters- Throws:
IllegalArgumentException
- ifgenerationDataGroupName
isnull
or invalid, orparameters
isnull
ZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursGenerationDataGroupExistsException
- if the generation data group (or a like-named dataset) already existsDefinitionFailedException
- if the definition fails on the z/OS host (likely caused by the user's credentials not having the authority to create this generation data group)MethodNotSupportedException
- if the z/OS host does not support generation data group methods- Since:
- 2.1.0
- See Also:
DefineGenerationDataGroupParametersBuilder
,isGenerationDataGroupsSupported()
-
findGenerationDataGroup
IGenerationDataGroup findGenerationDataGroup(String generationDataGroupName)
Returns the generation data group with the specified name if it can be found on the associated z/OS host.- Parameters:
generationDataGroupName
- the name of the generation data group- Returns:
- the generation data group, or
null
if the generation data group could not be found - Throws:
IllegalArgumentException
- ifgenerationDataGroupName
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursMethodNotSupportedException
- if the z/OS host does not support generation data group methods- Since:
- 2.1.0
- See Also:
isGenerationDataGroupsSupported()
-
findGenerationDataGroups
List<IGenerationDataGroup> findGenerationDataGroups(String generationDataGroupFilter)
Returns the list of generation data groups that match the specified filter on the associated z/OS host.An empty list will be returned if no generation data groups match the specified filter.
For the rules of a valid dataset filter, see
IDataSetCommandProvider
.- Parameters:
generationDataGroupFilter
- the generation data group filter- Returns:
- the list of matching generation data groups
- Throws:
IllegalArgumentException
- ifgenerationDataGroupFilter
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursMethodNotSupportedException
- if the z/OS host does not support generation data group methods- Since:
- 2.1.0
- See Also:
isGenerationDataGroupsSupported()
-
findGenerationDataSet
IDataSet findGenerationDataSet(String generationDataGroupName, int relativeGenerationNumber)
Returns a specific generation dataset from the specified 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:- The generation data group does not exist
- A generation dataset for the specified relative generation number does not exist
fetchGenerationDataSets(String)
.
To retrieve a generation dataset for a specific generation, typed as anISequentialDataSet
, seefindGenerationSequentialDataSet(String, int)
.- Parameters:
generationDataGroupName
- the name of the generation data grouprelativeGenerationNumber
- the relative generation number- Returns:
- the generation dataset, or
null
if the generation dataset could not be found - Throws:
IllegalArgumentException
- ifgenerationDataGroupName
isnull
or invalid, orrelativeGenerationNumber
is outside the range of 0 through -999ZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursMethodNotSupportedException
- if the z/OS host does not support generation data group methods- Since:
- 2.1.0
- See Also:
fetchGenerationDataSets(String)
,findGenerationSequentialDataSet(String, int)
,isGenerationDataGroupsSupported()
-
findGenerationSequentialDataSet
ISequentialDataSet findGenerationSequentialDataSet(String generationDataGroupName, int relativeGenerationNumber)
Returns a specific generation dataset, typed as anISequentialDataSet
, from the specified 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:- The generation data group does not exist
- 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
fetchGenerationDataSets(String)
.
To retrieve a generation dataset for a specific generation, typed as anIDataSet
, seefindGenerationDataSet(String, int)
.- Parameters:
generationDataGroupName
- the name of the generation data grouprelativeGenerationNumber
- 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
- ifgenerationDataGroupName
isnull
or invalid, orrelativeGenerationNumber
is outside the range of 0 through -999ZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursMethodNotSupportedException
- if the z/OS host does not support generation data group methods- Since:
- 2.1.0
- See Also:
fetchGenerationDataSets(String)
,findGenerationDataSet(String, int)
,isGenerationDataGroupsSupported()
-
fetchGenerationDataSets
List<IDataSet> fetchGenerationDataSets(String generationDataGroupName) throws GenerationDataGroupNotFoundException
Returns a list of all generation datasets from the specified generation data group on the associated z/OS host.The datasets returned will be ordered from newest generation to oldest.
To retrieve a generation dataset for a specific generation, typed as an
IDataSet
, seefindGenerationDataSet(String, int)
.
To retrieve a generation dataset for a specific generation, typed as anISequentialDataSet
, seefindGenerationSequentialDataSet(String, int)
.- Parameters:
generationDataGroupName
- the name of the generation data group- Returns:
- the list of generation datasets
- Throws:
IllegalArgumentException
- ifgenerationDataGroupName
isnull
or invalidZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursMethodNotSupportedException
- if the z/OS host does not support generation data group methodsGenerationDataGroupNotFoundException
- if the generation data group does not exist- Since:
- 2.1.0
- See Also:
findGenerationDataSet(String, int)
,findGenerationSequentialDataSet(String, int)
,isGenerationDataGroupsSupported()
-
-