import { AbstractSession , IHandlerParameters } from "@zowe/imperative" ; import { IZosFilesResponse , ICreateVsamOptions , Create } from "@zowe/zos-files-for-zowe-sdk" ; import { ZosFilesBaseHandler } from "../../ZosFilesBase.handler" ; /**
 * Handler to create a VSAM data set
 */ export default class VsamHandler extends ZosFilesBaseHandler { public async processWithSession ( commandParameters , session ) { const createVsamOptions = JSON . parse ( JSON . stringify ( { dsorg : commandParameters . arguments . dataSetOrganization , size : commandParameters . arguments . size , secondary : commandParameters . arguments . secondarySpace , volumes : commandParameters . arguments . volumes , storclass : commandParameters . arguments . storageClass , mgntclass : commandParameters . arguments . managementClass , dataclass : commandParameters . arguments . dataClass , retainFor : commandParameters . arguments . retainFor , retainTo : commandParameters . arguments . retainTo , showAttributes : commandParameters . arguments . showAttributes , responseTimeout : commandParameters . arguments . responseTimeout } ) ) ; return Create . vsam ( session , commandParameters . arguments . dataSetName , createVsamOptions ) ; } }