Interface IPartitionedDataSet
-
- All Superinterfaces:
IDataSet
,IHostResource
public interface IPartitionedDataSet extends IDataSet
A partitioned dataset (PDS) that resides on a z/OS host.For details on the state of an
IPartitionedDataSet
and the function of its methods, seeIHostResource
.Regarding parameter validation for the methods within this class:
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).
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 allocate a partitioned dataset:IDataSetCommandProvider commandProvider = ... String dataSetName = ... IAllocateParameters parameters = ... try { commandProvider.allocatePartitionedDataSet(dataSetName, parameters); } catch (DataSetExistsException e) { // the dataset already exists ... } catch (AllocationFailedException e) { // the allocation failed - most likely because the user does not have the proper authority ... }
(Note: the abovecatch
blocks can be replaced with a singlecatch
block onHostResourceException
.)(Note: see
AllocateParametersBuilder
for examples of building allocate parameters.)To retrieve a partitioned dataset:
IDataSetCommandProvider commandProvider = ... String dataSetName = ... // dataSet will be null if it cannot be found IPartitionedDataSet dataSet = commandProvider .findPartitionedDataSet(dataSetName);
To retrieve a list of partitioned datasets matching a filter:IDataSetCommandProvider commandProvider = ... String dataSetFilter = ... // dataSets will be empty if no partitioned datasets match the dataset // filter List<IPartitionedDataSet> dataSets = commandProvider .findPartitionedDataSets(dataSetFilter);
For examples on how to obtain anIDataSetCommandProvider
seeIDataSetCommandProvider
.
For examples of how to retrieve genericIDataSet
s seeIDataSet
.
For examples of how to build allocate parameters seeAllocateParametersBuilder
.- Since:
- 1.0.0
- Version:
- 2.0.0
- See Also:
IPartitionedDataSetCharacteristics
,IPartitionedDataSetMember
- 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
createMember(String memberName)
Creates a member with the specified name within this partitioned dataset.void
deleteMember(String memberName)
Deletes the member with the specified name from this partitioned dataset.IPartitionedDataSetCharacteristics
fetchCharacteristics()
Fetches the characteristics of this partitioned dataset from the z/OS host on which it resides.IPartitionedDataSetMember
findMember(String memberName)
Returns the member with the specified name if it can be found within this partitioned dataset.List<IPartitionedDataSetMember>
findMembers(String memberFilter)
Returns the list of this partitioned dataset's members that match the specified filter.boolean
isExtended()
Returns whether this partitioned dataset is extended (is a PDSE).-
Methods inherited from interface com.compuware.api.topaz.hostresources.zos.IDataSet
delete, getHostConnection, getType, isAlias
-
Methods inherited from interface com.compuware.api.topaz.hostresources.IHostResource
getName
-
-
-
-
Method Detail
-
createMember
void createMember(String memberName) throws DataSetAccessException, DataSetInUseException, DataSetMigratedException, DataSetNotFoundException, MemberAlreadyExistsException
Creates a member with the specified name within this partitioned dataset.- Parameters:
memberName
- the name of the member to create- Throws:
IllegalArgumentException
- 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 create authority for this partitioned datasetDataSetInUseException
- if an exclusive enqueue exists on this partitioned datasetDataSetMigratedException
- if this partitioned dataset is migrated (this may occur if the dataset is migrated after it is retrieved from the z/OS host)DataSetNotFoundException
- if this partitioned dataset no longer exists (this may occur if the dataset is deleted after it is retrieved from the z/OS host)MemberAlreadyExistsException
- if a member with the same name already exists in this partitioned dataset- Since:
- 1.1.0
-
deleteMember
void deleteMember(String memberName) throws DataSetAccessException, DataSetInUseException, DataSetMigratedException, DataSetNotFoundException, MemberInUseException, MemberNotFoundException
Deletes the member with the specified name from this partitioned dataset.- Parameters:
memberName
- the name of the member to delete- Throws:
IllegalArgumentException
- 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 create authority for this partitioned datasetDataSetInUseException
- if an exclusive enqueue exists on this partitioned datasetDataSetMigratedException
- if this partitioned dataset is migrated (this may occur if the dataset is migrated after it is retrieved from the z/OS host)DataSetNotFoundException
- if this partitioned dataset no longer exists (this may occur if the dataset is deleted after it is retrieved from the z/OS host)MemberInUseException
- if an exclusive enqueue exists on the memberMemberNotFoundException
- if the member does not exist in this partitioned dataset- Since:
- 1.1.0
-
fetchCharacteristics
IPartitionedDataSetCharacteristics fetchCharacteristics() throws DataSetAccessException, DataSetInUseException, DataSetMigratedException, DataSetNotFoundException
Fetches the characteristics of this partitioned dataset from the z/OS host on which it resides.The state of the partitioned dataset characteristics returned from this method is a snapshot of these characteristics from the time this method is called. Any changes made to these characteristics after this method is called will not be reflected in any previously returned partitioned dataset characteristics. This method may be called again to retrieve a current snapshot of the partitioned dataset characteristics.
- Specified by:
fetchCharacteristics
in interfaceIDataSet
- Returns:
- the partitioned dataset characteristics
- Throws:
ZOSSystemException
- if a z/OS system error occursZOSAbendException
- if a z/OS ABEND occursDataSetAccessException
- if the user's credentials do not grant access authority for this partitioned datasetDataSetInUseException
- if an exclusive enqueue exists on this partitioned datasetDataSetMigratedException
- if this partitioned dataset is migrated (this may occur if the dataset is migrated after it is retrieved from the z/OS host)DataSetNotFoundException
- if this partitioned dataset no longer exists (this may occur if the dataset is deleted after it is retrieved from the z/OS host)- Since:
- 1.0.0
-
findMember
IPartitionedDataSetMember findMember(String memberName) throws DataSetAccessException, DataSetInUseException, DataSetMigratedException, DataSetNotFoundException
Returns the member with the specified name if it can be found within this partitioned dataset.- Parameters:
memberName
- the name of the member- Returns:
- the partitioned dataset member, or
null
if the member could not be found - Throws:
IllegalArgumentException
- 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 this partitioned datasetDataSetInUseException
- if an exclusive enqueue exists on this partitioned datasetDataSetMigratedException
- if this partitioned dataset is migrated (this may occur if the dataset is migrated after it is retrieved from the z/OS host)DataSetNotFoundException
- if this partitioned dataset no longer exists (this may occur if the dataset is deleted after it is retrieved from the z/OS host)- Since:
- 1.0.0
-
findMembers
List<IPartitionedDataSetMember> findMembers(String memberFilter) throws DataSetAccessException, DataSetInUseException, DataSetMigratedException, DataSetNotFoundException
Returns the list of this partitioned dataset's members that match the specified filter.A
null
member filter can be specified to return all members.An empty list will be returned if none of this partitioned dataset's members match the specified filter.
- Parameters:
memberFilter
- the member filter, ornull
to return all members- Returns:
- the list of matching partitioned dataset members
- Throws:
IllegalArgumentException
- 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 this partitioned dataset is migrated (this may occur if the dataset is migrated after it is retrieved from the z/OS host)DataSetNotFoundException
- if this partitioned dataset no longer exists (this may occur if the dataset is deleted after it is retrieved from the z/OS host)- Since:
- 1.0.0
-
isExtended
boolean isExtended()
Returns whether this partitioned dataset is extended (is a PDSE).- Returns:
true
if this partitioned dataset is extended,false
otherwise- Since:
- 1.0.0
-
-