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

Spring forward with IBM z/OS Core v1.9.0

By Demetri Dimatos posted Wed March 20, 2024 11:53 AM

  

Earlier this year, we announced a beta release for IBM z/OS Ansible Core, we are happy to announce that IBM z/OS Ansible Core version 1.9.0 has released to Automation Hub,  Galaxy and is available in GitHub. This release comes with optional service and support for Automation Hub users and community support for Galaxy and GitHub users. I recommend reading over the release notes as well as the changelog, this will provide you an understanding of the all the changes. 


If you are using the beta, we recommend you update the collection since there have been several additional updates in both the modules and documentation.  
This will be the last minor release that will support ZOAU 1.2.x, in other words, this release will continue to receive security and bug fixes as version 1.9.x, all future releases will require ZOAU 1.3.x minimally. 

This release includes 10 enhancements, 13 bugfixes, documentation updates, new examples, and some important notices. 

Enhancements


Module zos_job_submit performance has been improved in both the plugin and module while also extending support to 4 job status types, CAB, CNV, FLU, SYS and continued support for ABEND, AC, CANCELLED, JCLERROR, SEC and ?. These status types are returned in property ret_code[msg]:

  • Job status ABEND indicates the job ended abnormally.
  • Job status AC indicates the job is active, often a started task or job taking long.
  • Job status CAB indicates a converter abend.
  • Job status CANCELED indicates the job was canceled.
  • Job status CNV indicates a converter error.
  • Job status FLU indicates the job was flushed.
  • Job status JCLERR or JCL ERROR indicates the JCL has an error.
  • Job status SEC or SEC ERROR indicates the job as encountered a security error.
  • Job status SYS indicates a system failure.
  • Job status ? indicates status cannot be determined.

In addition to the new job status types, the module was enhanced to detect jobs submitted with TYPRUN=SCAN, so that it will not result in a playbook task failure. When the module detects TYRUN=SCAN the complex type ret_code will have an updated response and populated accordingly, for example:
"ret_code":{
   "code":null,
   "msg":"TYPRUN=SCAN",
   "msg_code":null,
   "msg_txt":"The job JOB00283 was run with special job processing TYPRUN=SCAN. This will result in no completion, return code or job steps and changed will be false.",
   "steps":[]
}

While jobs submitted with TYPRUN equal to HOLD, JCLHOLD or COPY will deviate from the original execution path and be processed as a job that exceeds the modules execution time. This is an improvement over the previous execution path, full support for HOLD, JCLHOLD and COPY will come in a future release. The response complex type for TYPRUN equal to HOLD, JCLHOLD or COPY appears as:
...complete response intentionally removed.....
"ret_code":{
   "code":null,
   "msg":"AC",
   "msg_code":"?",
   "msg_txt":"The JCL submitted with job id JOB00554 but appears to be a long running job that exceeded its maximum wait time of 10 second(s). Consider using module zos_job_query to poll for a long running job or increase option 'wait_times_s' to a value greater than 12.",
   "steps":[]
},
"subsystem":"",
"svc_class":"ALLBATCH",
"system":""
}
],
"mode":"0600",
"msg":"The JCL submitted with job id JOB00554 but appears to be a long running job that exceeded its maximum wait time of 10 second(s). Consider using module zos_job_query to poll for a long running job or increase option 'wait_times_s' to a value greater than 12.",

Modules zos_apf, zos_operator, zos_job_query and zos_job_submit exception handling has been improved for both, when the module detects a  misconfigured ZOAU environment  or when unable to process a response originating as a batch update, are now propagated to the Ansible controller.

Module zos_copy improved performance when copying multiple members from one PDS/E to another PDS/E.

Module zos_job_output has been enhanced to allow for both a job ID and owner to be selected when obtaining job output, removing the prior mutual exclusivity.

Module zos_mvs_raw has been enhanced to ensure that instream-data for option dd_input contain blanks in columns 1 and 2 while retaining a maximum length of 80 columns for strings and a list of strings which is generally the requirement for most z/OS programs.

Bugfixes

Module zos_apf fixes an issue that when operation=list was selected and more than one data set entry was fetched, only one data set was returned, now the complete list is returned.

Module zos_copy fixes 2 issues:

  1. When copying an aliased executable from a data set to a non-existent data set, the destination datasets primary and secondary extents would not match the source data set extent sizes.
  2. When performing a copy operation to an existing file, the copied file resulted in having corrupted contents.

Module zos_job_submit fixes 4 issues:
  1. When no location is set, the default is not correctly set to location=DATA_SET.
  2. When a JCL ERROR is encountered, the complex type ret_code[msg_code] would include a multi-line marker used to coordinate errors.
  3. When a response was returned, the complex type ret_code[msg_text] was incorrectly returned, now ret_code[msg_txt] is returned.
  4. When option wait_time_s was used, the duration would be approximately 5 seconds longer than what was reported. Now the duration is from when the job is submitted to when the module reads the job output.

Module zos_job_output and zos_job_query fixed an issue that when using a job ID with less than 8 characters, would result in a traceback. The fix supports shorter job IDs as well as the use of wildcards.

Module zos_unarchive fixes 2 issues:
  1. When using a local file with the USS format option, the module would fail to send the archive to the managed node.
  2. When unarchiving USS files, the module would leave temporary files behind on the managed node.

The module utils libraries, which are generally internal to the collection were updated:
  1. job.py improved exception handling and added a message inside the content of the ddname when a non-printable character (character that cannot be converted to UTF-8) is encountered.
    1. It is important to note that when a non-printable character is encountered, the playbook task will no longer fail, instead the DD with the offending character mapping, will have a message like this for the DD.
      {
         "ddname":"STDOUT",
         "record_count":"257",
         "id":"102",
         "stepname":"NOPRINT",
         "proctep":"None",
         "byte_count":"16383",
         "content":[
            "Non-printable UTF-8 characters were present in this output. Please access it manually."
         ]
      }
    2. If you would like for the non-printable characters to be correctly mapped to UTF-8 and avoid the above message, you must update to minimally ZOAU 1.2.5.6 (APAR PH60060).

  2. data_set.py fixed an issue that when a volser name less than 6 characters was encountered, the volser name was padded with hyphens to have length 6.



Documentation

Module zos_mvs_raw has been updated with new examples demonstrating a YAML block indicator, often helpful when wanting to control the instream-data formatting.

Module zos_tso_command has been updated with:
  1. A new example demonstrating how to explicitly execute a REXX script in a data set.
  2. A new example demonstrating how to chain multiple TSO commands into one invocation using semicolons.

Other documentation updates include improved module and filter documentation. 

Important Notices

At the start of the blog, it was noted that this will be the last minor release that will support ZOAU 1.2.x, in other words, this release will continue to receive security and bug fixes as version 1.9.x. This release will continue to be supported until ZOAU 1.2.x reaches end of life on April 30th, 2025. 

On a similar note, it is advised that users adopt IBM Open Enterprise SDK for Python 3.11 as version 3.9.x will reach end of service on April 30th , 2024 and version 3.10.x will reach end of service on September 30th, 2024.

The certified content aligns to the Ansible Automation Platform (AAP) lifecycle, thus ansible-core 2.14 (AAP 2.3) will no longer be supported with this release. It is recommended to use either ansible-core 2.15 (AAP 2.4) or later.

For  z/OS 3.1, support is currently not available, it will come later this year. 

It came to our attention that some were using the undocumented option size in module zos_data_set , because the collection undergoes certification, the module could no longer continue to include this option. You should migrate playbooks to use space_primary, it will perform the same function as the previously undocumented size option.

In the past, choices could be defined in either lower or upper case. Now, only the case that is identified in the docs can be set, this is so that the collection can continue to maintain certified status.


Lastly, it worth mentioning this again, in this release the collection can now manage non-printable characters which previously resulted in a UnicodeDecodeError. The collection will manage the exception and adjust the DD with the non-printable character. If you would like to see the content with the non-printable chars, migrate to ZOAU 1.2.5.6 (APAR PH60060). 

About the Author
Demetrios Dimatos is the IBM z/OS Ansible Core Senior Technical Lead with 17 years mainframe experience and over 20 years of development experience; having led multiple products ranging from client server technologies, administration consoles, IBM Open Platform (Hadoop - HDFS, MapReduce, Yarn) and Spark, Linux, and Solaris kernel development. 

The Development Team

Without the development team, this would not be possible. I would like to thank the amazing team who work with passion and perseverance on this project. 

  • Rich Parker
  • Ketan Kelkar
  • Oscar Fernando Flores Garcia
  • Ivan Alejandro Moreno Soto
  • Andre Marcel Gutierrez Benitez

Resources

IBM Ansible z/OS core on Galaxy
IBM Ansible Core Collection Repository on GitHub
IBM Ansible Core Collection on Automation Hub
Red Hat® Ansible Certified Content for IBM Z documentation

0 comments
73 views

Permalink