@zowe/cli
Version:
Zowe CLI is a command line interface (CLI) that provides a simple and streamlined way to interact with IBM z/OS.
121 lines (120 loc) • 6.45 kB
TypeScript
import { AbstractSession } from "@zowe/imperative";
import { IJob, ISubmitJclNotifyParm, ISubmitJclParms, ISubmitJobNotifyParm, ISubmitJobParms } from "../../../zosjobs";
import { ISubmitParms } from "./doc/input/ISubmitParms";
import { ISpoolFile } from "./doc/response/ISpoolFile";
/**
* Class to handle submitting of z/OS batch jobs via z/OSMF
* @export
* @class SubmitJobs
*/
export declare class SubmitJobs {
/**
* Submit a job that resides in a z/OS data set.
* @static
* @param {AbstractSession} session - z/OSMF connection info
* @param {string} jobDataSet - job data set to be translated into parms object
* @returns {Promise<IJob>} - Promise that resolves to an IJob document with details about the submitted job
* @memberof SubmitJobs
*/
static submitJob(session: AbstractSession, jobDataSet: string): Promise<IJob>;
/**
* Submit a job that resides in a z/OS data set.
* @static
* @param {AbstractSession} session - z/OSMF connection info
* @param {ISubmitJobParms} parms - parm object (see for details)
* @returns {Promise<IJob>} - Promise that resolves to an IJob document with details about the submitted job
* @memberof SubmitJobs
*/
static submitJobCommon(session: AbstractSession, parms: ISubmitJobParms): Promise<IJob>;
/**
* Submit a string of JCL to run
* @static
* @param {AbstractSession} session - z/OSMF connection info
* @param {string} jcl - string of JCL that you want to be submit
* @param {string} internalReaderRecfm - record format of the jcl you want to submit. "F" (fixed) or "V" (variable)
* @param {string} internalReaderLrecl - logical record length of the jcl you want to submit
* @returns {Promise<IJob>} - Promise that resolves to an IJob document with details about the submitted job
* @memberof SubmitJobs
*/
static submitJcl(session: AbstractSession, jcl: string, internalReaderRecfm?: string, internalReaderLrecl?: string): Promise<IJob>;
static submitJclString(session: AbstractSession, jcl: string, parms: ISubmitParms): Promise<IJob | ISpoolFile[]>;
/**
* Submit a JCL string to run
* @static
* @param {AbstractSession} session - z/OSMF connection info
* @param {ISubmitJclParms} parms - parm object (see for details)
* @returns {Promise<IJob>} - Promise that resolves to an IJob document with details about the submitted job
* @memberof SubmitJobs
*/
static submitJclCommon(session: AbstractSession, parms: ISubmitJclParms): Promise<IJob>;
/**
* Submit a JCL string to run
* @static
* @param {AbstractSession} session - z/OSMF connection info
* @param {string} jcl - string of JCL that you want to be submit
* @param {string} internalReaderRecfm - record format of the jcl you want to submit. "F" (fixed) or "V" (variable).
* @param {string} internalReaderLrecl - logical record length of the jcl you want to submit
* @returns {Promise<IJob>} - Promise that resolves to an IJob document with details about the submitted job
* @memberof SubmitJobs
*/
static submitJclNotify(session: AbstractSession, jcl: string, internalReaderRecfm?: string, internalReaderLrecl?: string): Promise<IJob>;
/**
* Submit a job from a string of JCL and be notified whenever it reaches the default status on a default polling interval.
* @static
* @param {AbstractSession} session - z/OSMF connection info
* @param {ISubmitJclNotifyParm} parms - parm object (see for details)
* @returns {Promise<IJob>} - Promise that resolves to an IJob document with details about the submitted job
* @memberof SubmitJobs
*/
static submitJclNotifyCommon(session: AbstractSession, parms: ISubmitJclNotifyParm): Promise<IJob>;
/**
* Submit a job and be notified whenever it reaches the default status on a default polling interval.
* @static
* @param {AbstractSession} session - z/OSMF connection info
* @param {string} jobDataSet - job data set to be translated into parms object with assumed defaults
* @returns {Promise<IJob>} - Promise that resolves to an IJob document with details about the submitted job
* @memberof SubmitJobs
*/
static submitJobNotify(session: AbstractSession, jobDataSet: string): Promise<IJob>;
/**
* Submit a job from a data set and be notified whenever it reaches a certain status.
* If not status is specified, MonitorJobs.DEFAULT_STATUS is assumed.
* The polling interval can also be optionally controlled via parms.watchDelay.
* If not specified, the default polling is MonitorJobs.DEFAULT_WATCH_DELAY.
* @static
* @param {AbstractSession} session - z/OSMF connection info
* @param {ISubmitJobNotifyParm} parms - parm object (see for details)
* @returns {Promise<IJob>} - Promise that resolves to an IJob document with details about the submitted job
* @memberof SubmitJobs
*/
static submitJobNotifyCommon(session: AbstractSession, parms: ISubmitJobNotifyParm): Promise<IJob>;
/**
* Common method to handle job submit options
* @public
* @static
* @param {AbstractSession} session - z/OSMF connection info
* @param {ISubmitParms } parms - Submit options
* @param {IJob} responseJobInfo - job document for a previously submitted job
* @returns {Promise<IJob | ISpoolFile[]>} - Promise that resolves to an IJob or ISpoolFile[]
* @memberof SubmitJobs
*/
static checkSubmitOptions(session: AbstractSession, parms: ISubmitParms, responseJobInfo: IJob): Promise<IJob | ISpoolFile[]>;
/**
* Common method to watch for a job to reach a certain status whether the job was
* submitted through raw JCL statement or through a data set containing JCL.
* @private
* @static
* @param {AbstractSession} session - z/OSMF connection info
* @param {IJob} job - job document for a previously submitted job
* @param {JOB_STATUS } status - status that we want this job to reach before notifying
* @param {number} watchDelay - delay / interval to poll
* @returns {Promise<IJob>} - Promise that resolves to an IJob document with details about the submitted job
* @memberof SubmitJobs
*/
private static submitNotifyCommon;
/**
* Getter for brightside logger
* @returns {Logger}
*/
private static get log();
}