import { AbstractSession , IHandlerParameters } from "@zowe/imperative" ; import { Copy , IZosFilesResponse , IDataSet , ICopyDatasetOptions } from "@zowe/zos-files-for-zowe-sdk" ; import { ZosFilesBaseHandler } from "../../ZosFilesBase.handler" ; import { getDataSet } from "../../ZosFiles.utils" ; /**
 * Handler to copy a data set.
 */ export default class DsHandler extends ZosFilesBaseHandler { public async processWithSession ( commandParameters , session ) { const fromDataSet = getDataSet ( commandParameters . arguments . fromDataSetName ) ; const toDataSet = getDataSet ( commandParameters . arguments . toDataSetName ) ; const options = { fromDataSet , responseTimeout : commandParameters . arguments . responseTimeout } ; if ( commandParameters . arguments . replace ) { options . replace = commandParameters . arguments . replace ; } return Copy . dataSet ( session , toDataSet , options ) ; } }