import { IHandlerParameters , ImperativeError } from "@zowe/imperative" ; import { StartTso , ZosTsoBaseHandler } from "@zowe/zos-tso-for-zowe-sdk" ; export class implements ICommandHandler export default class Handler extends ZosTsoBaseHandler { public async processCmd ( commandParameters ) { const response = await StartTso . start ( this . mSession , this . mArguments . account , this . mTsoStart ) ; commandParameters . response . data . setObj ( response ) ; if ( response . success ) { if ( commandParameters . arguments . servletKeyOnly ) { commandParameters . response . console . log ( response . servletKey ) ; } else { commandParameters . response . console . log ( `TSO address space began successfully, key is: ${ response . servletKey }\n` ) ; commandParameters . response . console . log ( response . messages ) ; } } else { throw new ImperativeError ( { msg : `TSO address space failed to start.` , additionalDetails : response . failureResponse ?. message } ) ; } } }