Class ZosDsnCopy


  • public class ZosDsnCopy
    extends Object
    Provides copy dataset and dataset member functionality
    Version:
    1.0
    Author:
    Leonid Baranov
    • Constructor Detail

      • ZosDsnCopy

        public ZosDsnCopy​(ZOSConnection connection)
        ZosDsnCopy constructor
        Parameters:
        connection - is a connection, see ZOSConnection object
      • ZosDsnCopy

        public ZosDsnCopy​(ZOSConnection connection,
                          ZoweRequest request)
                   throws Exception
        Alternative ZosDsnCopy constructor with ZoweRequest object. This is mainly used for internal code unit testing with mockito, and it is not recommended to be used by the larger community.
        Parameters:
        connection - connection information, see ZOSConnection object
        request - any compatible ZoweRequest Interface type object
        Throws:
        Exception - processing error
    • Method Detail

      • copy

        public Response copy​(String fromDataSetName,
                             String toDataSetName,
                             boolean replace,
                             boolean copyAllMembers)
                      throws Exception
        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 source partition dataset to another partition dataset.

        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 source partition dataset specified
        Returns:
        http response object
        Throws:
        Exception - error processing copy request
      • copy

        public Response copy​(CopyParams params)
                      throws Exception
        Copy dataset or dataset member
        Parameters:
        params - contains copy dataset parameters
        Returns:
        http response object
        Throws:
        Exception - error processing copy request