Ansible for IBM Z

Ansible for IBM Z

Ansible for IBM Z

Facilitate communication, user interaction and feedback for Red Hat Ansible Certified Content for IBM Z

 View Only
  • 1.  How to setup ing requests for system automation by ansible?

    Posted Fri May 03, 2024 01:34 PM

    Hi,

    I need to restart a started task by ansible with system automation on z/OS. Therefore I translated a working job to an ansible task and with zos_mvs_raw-module:

          ibm.ibm_zos_core.zos_mvs_raw:
            program_name: IKJEFT01
            auth: true
            dds:
              - dd_output:
                  dd_name: SYSTSPRT
                  return_content:
                    type: text
              - dd_input:
                  dd_name: SYSTIN
                  content: "EX 'SYS1.ING.SINGTREX(AOFRYCMD)' 'SERVER=* HIGHRC=00 MAXRC=00"
              - dd_dummy:
                  dd_name: SYSIN
    Hint: I just skiped the commands in SYSIN because even the call of AOFRYCMD does not work properly. 
    This task ends in error:

    failed: [mvse] (item=MVSR) => {
        "ansible_loop_var": "item",
        "backups": [],
        "changed": false,
        "dd_names": [],
        "failed_when_result": true,
        "item": "MVSR",
        "ret_code": {
            "code": 8
        }
    }

    MSG:

    ZOSRawError('An error occurred during execution of z/OS program IKJEFT01.  BGYSC0232E Child process did not complete correctly for IKJEFT01.\n')

    Does any have an idea how to get the job done?
    My stack:
    ibm_zos_core v1.9.0
    ansible [core 2.16.6]
    python on z/OS 3.11
    zoau-1.2.4.5


    ------------------------------
    Michael Witzgall
    ------------------------------


  • 2.  RE: How to setup ing requests for system automation by ansible?

    Posted Fri May 03, 2024 04:16 PM

    Hello, I have a few comments that might help.
    - There is a sample here using IKJEFT01 here that might be of help.

    - Try adding option `verbose: true`, see doc here, it might help get more details, eg

          ibm.ibm_zos_core.zos_mvs_raw:
            program_name: "{{ pgm_member }}"
            auth: false
            verbose: true

    - You might try over here where the team triages issues and discussions. 
    - Looks like your trying to run a REXX exec, you might try also the zos_tso_command module.

    - name: Execute TSO command to run a REXX script explicitly from a data set.
      zos_tso_command:
        commands:
          - EXEC HLQ.DATASET.REXX exec


    ------------------------------
    Demetri Dimatos
    IBM zOS Ansible Core Senior Technical Lead
    IBM
    San Jose CA
    ------------------------------



  • 3.  RE: How to setup ing requests for system automation by ansible?

    Posted Mon May 06, 2024 04:59 AM

    Hello,

    I just tried verbose=true for retrieving more information. However I did not receive any hint.

    Running the batch intreface programm with zos_tso_command worked! But I need to specifi an input dd statement (SYSIN by default). I did not find an hint how this is possible for zos_tso_command.

    I did create a thread in the github space like you recommended! 

    Thanks for advice.



    ------------------------------
    Michael Witzgall
    ------------------------------