ibm_zos_core icon indicating copy to clipboard operation
ibm_zos_core copied to clipboard

[Bug] zos_find - does not find VSAM file open with DISP of OLD

Open EdwardMcCarthy opened this issue 2 years ago • 16 comments

Bug description

I had this task

- name: Check if a VSAM files exist
  ibm.ibm_zos_core.zos_find:
    patterns:
      - CICSUSER.SC00CIC1.EXMPCAT
    resource_type: cluster
  register: cnvResult

- name:  result 1
  debug:
    msg: "{{ cnvResult }}"

When VSAM file open in CICS with DISP of SHR get expected result as VSAM file does exist:

ok: [zceeZosLpar] => { "msg": { "changed": false, "data_sets": [ { "name": "CICSUSER.SC00CIC1.EXMPCAT", "type": "CLUSTER" } ], "examined": 1, "failed": false, "matched": 1 } }

But when VSAM file open in CICS with DISP of OLD get

ok: [zceeZosLpar] => { "msg": { "changed": false, "data_sets": [], "examined": 0, "failed": false, "matched": 0 } }

which is clearly not correct

Playbook verbosity output

feb-16-cicsVsamFile-Disp-OLD-ansible-log.txt

Contents of ansible.cfg

[defaults]
forks = 25
stdout_callback = yaml
callback_whitelist = profile_tasks

[callback_profile_tasks]
sort_order = none
task_output_limit=400

[ssh_connection]
pipelining = True

Contents of the inventory

n/a

Contents of group_vars or host_vars

n/a

Ansible version

ansilbe --version 

shows

ansible [core 2.14.1]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/ansible/library']
  ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True

zOAU version

/usr/lpp/IBM/zoautil/bin>./zoaversionhelper
2022/12/06 20:44:00 CUT V1.2.2 ee30137 2525

IBM z/OS Ansible core Version

v1.4.0

IBM ZOAU version

v1.2.2

z/OS version

2.5

Ansible module

zos_find

EdwardMcCarthy avatar Feb 16 '23 05:02 EdwardMcCarthy