import { IHandlerParameters } from "@zowe/imperative" ; import { IJob , GetJobs , IJobFile } from "@zowe/zos-jobs-for-zowe-sdk" ; import { ZosmfBaseHandler } from "@zowe/zosmf-for-zowe-sdk" ; export class implements ICommandHandler export default class SpoolFilesHandler extends ZosmfBaseHandler { private type { * } memberof private profile : any ; private type { * } memberof private arguments : any ; param { IHandlerParameters } params returns { Promise < void > } memberof public async processCmd ( params ) { this . arguments = params . arguments ; const job = await GetJobs . getJob ( this . mSession , this . arguments . jobid ) ; const files = await GetJobs . getSpoolFilesForJob ( this . mSession , job ) ; this . data . setObj ( files ) ; this . data . setMessage ( `"${ files . length }" spool files obtained for job "${ job . jobname }(${ job . jobid })"` ) ; params . response . format . output ( { fields : [ "id" , "ddname" , "procstep" , "stepname" ] , output : files , format : "table" } ) ; } }