Class to handle obtaining of z/OS batch job information

export

### Hierarchy

- GetJobs

## Index

### Methods

- filterResultsByStatuses
- getJcl
- getJclCommon
- getJclForJob
- getJob
- getJobs
- getJobsByOwner
- getJobsByOwnerAndPrefix
- getJobsByParameters
- getJobsByPrefix
- getJobsCommon
- getSpoolContent
- getSpoolContentById
- getSpoolContentCommon
- getSpoolFiles
- getSpoolFilesCommon
- getSpoolFilesForJob
- getStatus
- getStatusCommon
- getStatusForJob

## Methods

### Static Private filterResultsByStatuses

- filterResultsByStatuses(jobs: IJob[], params: IGetJobsParms | undefined): IJob[]

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:415

  #### Parameters

  - ##### jobs: IJob[]

  - ##### params: IGetJobsParms | undefined

  #### Returns IJob[]

### Static getJcl

- getJcl(session: AbstractSession, jobname: string, jobid: string): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:311

  Get JCL from a job.

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### jobname: string

    the job name for the job for which you want to retrieve JCL

  - ##### jobid: string

    the job ID for the job for which you want to retrieve JCL

  #### Returns Promise<any>

  - job document on resolve

### Static getJclCommon

- getJclCommon(session: AbstractSession, parms: IGetJclParms): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:339

  Get the JCL that was used to submit a job.

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### parms: IGetJclParms

    parm object (see IGetJclParms interface for details)

  #### Returns Promise<any>

  - promise that resolves to the JCL content

### Static getJclForJob

- getJclForJob(session: AbstractSession, job: IJob): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:326

  Get JCL from a job. Alternate version of the API that accepts an IJob object returned by other APIs such as SubmitJobs.

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### job: IJob

    the job for which you would like to retrieve JCL

  #### Returns Promise<any>

  - promise that resolves to JCL content

### Static getJob

- getJob(session: AbstractSession, jobid: string): Promise<IJob>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:107

  Get a single job object from an input job id

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### jobid: string

    the job ID for the job for which you want to get status

  #### Returns Promise<IJob>

  - promise that resolves to an IJob object from an input jobid

### Static getJobs

- getJobs(session: AbstractSession): Promise<IJob[]>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:32

  Get jobs (defaults to the user ID of the session as owner)

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  #### Returns Promise<IJob[]>

  - promise that resolves to an array of IJob objects (matching jobs)

### Static getJobsByOwner

- getJobsByOwner(session: AbstractSession, owner: string): Promise<IJob[]>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:62

  Get jobs that are owned by a certain user or pattern of users

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### owner: string

    owner for which to get jobs. Supports wildcard e.g. IBMU* returns jobs owned by all users whose ID beings with "IBMU"

  #### Returns Promise<IJob[]>

  - promise that resolves to an array of IJob objects (matching jobs)

### Static getJobsByOwnerAndPrefix

- getJobsByOwnerAndPrefix(session: AbstractSession, owner: string, prefix: string): Promise<IJob[]>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:79

  Get a list of jobs that match an owner and prefix

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### owner: string

    owner for which to get jobs. Supports wildcard e.g. IBMU* returns jobs owned by all users whose ID beings with "IBMU"

  - ##### prefix: string

    prefix for which to get jobs. Supports wildcard e.g. JOBNM* returns jobs with names starting with "JOBNM"

  #### Returns Promise<IJob[]>

  - promise that resolves to an array of IJob objects (matching jobs)

### Static getJobsByParameters

- getJobsByParameters(session: AbstractSession, params: IGetJobsParms): Promise<IJob[]>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:94

  Get a list of jobs that match various parameters

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### params: IGetJobsParms

  #### Returns Promise<IJob[]>

  - promise that resolves to an array of IJob objects (matching jobs)

### Static getJobsByPrefix

- getJobsByPrefix(session: AbstractSession, prefix: string): Promise<IJob[]>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:47

  Get jobs that match a job name preixl Defaults to jobs owned by the user ID in the session.

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### prefix: string

    job name prefix for which to list jobs. Supports wildcard e.g. JOBNM* returns jobs with names starting with "JOBNM"

  #### Returns Promise<IJob[]>

  - promise that resolves to an array of IJob objects (matching jobs)

### Static getJobsCommon

- getJobsCommon(session: AbstractSession, params?: IGetJobsParms): Promise<IJob[]>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:152

  Get jobs filtered by owner and prefix.

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### Optional params: IGetJobsParms

    parm object (see IGetJobsParms interface for details)

  #### Returns Promise<IJob[]>

  - promise that resolves to an array of IJob objects (matching jobs)

### Static getSpoolContent

- getSpoolContent(session: AbstractSession, jobFile: IJobFile, encoding?: string): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:367

  Get spool content from a job (keeping naming convention patter with this duplication function).

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### jobFile: IJobFile

    the spool file for which you want to retrieve the content

  - ##### Optional encoding: string

    the code page to use for EBCDIC translation

  #### Returns Promise<any>

  - promise that resolves to the spool content

### Static getSpoolContentById

- getSpoolContentById(session: AbstractSession, jobname: string, jobid: string, spoolId: number, encoding?: string): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:382

  Get spool content from a job using the job name, job ID, and spool ID number from z/OSMF

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### jobname: string

    the job name for the job containing the spool content

  - ##### jobid: string

    the job id for the job containing the spool content

  - ##### spoolId: number

    id number assigned by zosmf that identifies the particular job spool file (DD)

  - ##### Optional encoding: string

  #### Returns Promise<any>

  - promise that resolves to the spool content

### Static getSpoolContentCommon

- getSpoolContentCommon(session: AbstractSession, jobFile: IJobFile, encoding?: string): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:405

  Get spool content from a job.

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### jobFile: IJobFile

    the spool file for which you want to retrieve the content

  - ##### Optional encoding: string

    the code page to use for EBCDIC translation

  #### Returns Promise<any>

  - promise that resolves to the spool content

### Static getSpoolFiles

- getSpoolFiles(session: AbstractSession, jobname: string, jobid: string): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:265

  Get a list of all spool files for a job.

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### jobname: string

    the job name for the job for which you want to get a list of spool files

  - ##### jobid: string

    the job ID for the job for which you want to get a list of spool files

  #### Returns Promise<any>

  - promise that resolves to an array of IJobFile objects

### Static getSpoolFilesCommon

- getSpoolFilesCommon(session: AbstractSession, parms: ICommonJobParms): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:293

  Get a list of all job spool files for a job.

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### parms: ICommonJobParms

    parm object (see for details)

  #### Returns Promise<any>

  - promise that resolves to an array of IJobFile objectsl

### Static getSpoolFilesForJob

- getSpoolFilesForJob(session: AbstractSession, job: IJob): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:280

  Get a list of all job spool files for a job Alternate version of the API that accepts an IJob object returned by other APIs such as SubmitJobs.

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### job: IJob

    the job for which you would like to get a list of job spool files

  #### Returns Promise<any>

  - promise that resolves to an array of IJobFile objects

### Static getStatus

- getStatus(session: AbstractSession, jobname: string, jobid: string): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:217

  Get the status and other details (e.g. owner, return code) for a job

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### jobname: string

    the job name for the job for which you want to get status

  - ##### jobid: string

    the job ID for the job for which you want to get status

  #### Returns Promise<any>

  - promise that resolves to an IJob object representing the job

### Static getStatusCommon

- getStatusCommon(session: AbstractSession, parms: ICommonJobParms): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:247

  Get the status and other details (e.g. owner, return code) for a job

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### parms: ICommonJobParms

    parm object (see ICommonJobParms interface for details)

  #### Returns Promise<any>

  - promise that resolves to an IJob object representing the job

### Static getStatusForJob

- getStatusForJob(session: AbstractSession, job: IJob): Promise<any>

- - Defined in @zowe/zos-jobs-for-zowe-sdk/src/GetJobs.ts:234

  Get the status and other details (e.g. owner, return code) for a job Alternate version of the API that accepts an IJob object returned by other APIs such as SubmitJobs. Even though the parameter and return value are of the same type, the IJob object returned will have the current status of the job.

  static
  memberof

    GetJobs

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### job: IJob

    job object

  #### Returns Promise<any>

  - promise that resolves to an IJob object representing the job

Generated using TypeDoc