import { IHandlerParameters } from "@zowe/imperative" ; import { IJob , GetJobs } from "@zowe/zos-jobs-for-zowe-sdk" ; import { ZosmfBaseHandler } from "@zowe/zosmf-for-zowe-sdk" ; export class implements ICommandHandler export default class JobStatusByJobidHandler extends ZosmfBaseHandler { param { IHandlerParameters } params returns { Promise < void > } memberof public async processCmd ( params ) { const job = await GetJobs . getJob ( this . mSession , this . mArguments . jobid ) ; this . data . setObj ( job ) ; this . data . setMessage ( `Details obtained for job ${ this . mArguments . jobid }` ) ; params . response . format . output ( { fields : [ "jobid" , "retcode" , "jobname" , "status" ] , output : job , format : "object" } ) ; } }