Class DsnCopy


  • public class DsnCopy
    extends Object
    Provides copy dataset and dataset member functionality
    Version:
    5.0
    Author:
    Leonid Baranov, Frank Giordano
    • Constructor Detail

      • DsnCopy

        public DsnCopy​(ZosConnection connection)
        DsnCopy constructor
        Parameters:
        connection - is a connection, see ZosConnection object
    • Method Detail

      • copy

        public Response copy​(String fromDataSetName,
                             String toDataSetName,
                             boolean replace,
                             boolean copyAllMembers)
                      throws ZosmfRequestException
        This copy method allows the following copy operations:

        - sequential dataset to sequential dataset - sequential dataset to partition dataset member - partition dataset member to partition dataset member - partition dataset member to partition dataset non-existing member - partition dataset member to sequential dataset

        If copyAllMembers parameter value sent as true, it will perform a copy of all members in the source partition dataset to the target partition dataset if no member name included in the source partition dataset value (fromDataSetName).

        Parameters:
        fromDataSetName - is a name of source dataset (e.g. 'SOURCE.DATASET' or 'SOURCE.DATASET(MEMBER)')
        toDataSetName - is a name of target dataset (e.g. 'TARGET.DATASET' or 'TARGET.DATASET(MEMBER)')
        replace - if true members in the target dataset are replaced
        copyAllMembers - if true, copy all members in the source partition dataset specified
        Returns:
        http response object
        Throws:
        ZosmfRequestException - request error state
      • copyCommon

        public Response copyCommon​(DsnCopyInputData copyInputData)
                            throws ZosmfRequestException
        Copy dataset or dataset member request driven by DsnCopyInputData object settings
        Parameters:
        copyInputData - contains copy dataset parameters
        Returns:
        http response object
        Throws:
        ZosmfRequestException - request error state