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 an IDataSetCommandProvider:

     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 an IZOSHostConnection, see IZOSHostConnection.
    For examples on how to retrieve IDataSets, see IDataSet.
    For examples on how to delete IDataSets, see IDataSet.
    For examples on how to allocate IPartitionedDataSets, see IPartitionedDataSet.
    For examples on how to allocate ISequentialDataSets, see ISequentialDataSet.
    For examples on how to create or retrieve IPartitionedDataSetMembers, see IPartitionedDataSetMember.
    For examples on how to define or retrieve IGenerationDataGroups, see IGenerationDataGroup.
    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.