ibm / ibm.ibm_zos_core / 1.3.6 / module / zos_job_query Query job status | "added in version" 1.0.0 of ibm.ibm_zos_core" Authors: Ping Xiao (@xiaopingBJ)ibm.ibm_zos_core.zos_job_query (1.3.6) — module
Install with ansible-galaxy collection install ibm.ibm_zos_core:==1.3.6
collections: - name: ibm.ibm_zos_core version: 1.3.6
List z/OS job(s) and the current status of the job(s).
Uses owner to filter the jobs by the job owner.
Uses system to filter the jobs by system where the job is running (or ran) on.
Uses job_id to filter the jobs by the job id.
- name: list zos jobs with a jobname 'IYK3ZNA1' zos_job_query: job_name: "IYK3ZNA1"
- name: list the jobs matching jobname 'IYK3*' zos_job_query: job_name: "IYK3*"
- name: list the job with a jobname 'IYK3ZNA*' and jobid as JOB01427 zos_job_query: job_name: IYK3ZNA* job_id: JOB01427
- name: list the job with a jobname 'IYK3ZNA*' and owner as BROWNAD zos_job_query: job_name: IYK3ZNA* owner: BROWNAD
owner: description: - Identifies the owner of the job. - If no owner is set, the default set is 'none' and all jobs will be queried. required: false type: str job_id: description: - The job number that has been assigned to the job. These normally begin with STC, JOB, TSU and are followed by 5 digits. required: false type: str job_name: default: '*' description: - The job name to query. required: false type: str
changed: description: True if the state was changed, otherwise False. returned: always type: bool jobs: contains: job_id: description: Unique job id assigned to the job by JES. sample: JOB01427 type: str job_name: description: The name of the batch job. sample: IYK3ZNA2 type: str owner: description: The owner who ran the job. sample: BROWNAD type: str ret_code: contains: code: description: Return code converted to integer value (when possible). sample: 0 type: int msg: description: Return code or abend resulting from the job submission. sample: CC 0000 type: str description: Return code output collected from job log. sample: - code: 0 - msg: CC 0000 type: dict description: The list of z/OS job(s) and status. elements: dict returned: success sample: - job_id: JOB01427 job_name: IYK3ZNA1 owner: BROWNAD ret_code: 'null' - job_id: JOB16577 job_name: IYK3ZNA2 owner: BROWNAD ret_code: code: 'null' msg: CANCELED type: list message: description: Message returned on failure. returned: failure sample: msg: 'List FAILED! no such job been found: IYK3Z0R9' type: str