IBM / ibm_zos_zosmf

Ansible collection to work with z/OS based on z/OS Management Facility (z/OSMF).
19 stars 14 forks source link

How to assign value to z/OSMF header (X-IBM-Intrdr-File-Encoding)? #97

Open arvind-saigal opened 3 years ago

arvind-saigal commented 3 years ago

Good day team,

With the purpose of handling data (including job-log) containing Japanese characters, one of our clients is trying to set a combination of z/OSMF custom and standard headers (as mentioned below) while making use of various roles in ibm_zos_zosmf Ansible collection.

            'Content-Type': 'text/plain;charset=UTF-8',
            'X-IBM-Intrdr-Class': 'H',
            'X-IBM-Intrdr-Recfm': 'F',
            'X-IBM-Intrdr-Lrecl': '80',
            'X-IBM-Intrdr-Mode': 'TEXT',
            'X-IBM-Intrdr-File-Encoding': 'IBM-939',

            'Content-Type': 'application/octet-stream;charset=UTF-8',
            'X-IBM-Intrdr-Class': 'H',
            'X-IBM-Intrdr-Recfm': 'F',
            'X-IBM-Intrdr-Lrecl': '80',
            'X-IBM-Intrdr-Mode': 'BINARY',
            'X-IBM-Intrdr-File-Encoding': 'IBM-939',

We understand that in case of role - zmf_job_complete, header values can be assigned using a combination of role variables: -

  1. job_jcl_location
  2. job_internal_reader_mode
  3. job_internal_reader_class
  4. job_internal_reader_recfm
  5. job_internal_reader_lrecl

However, there is no role variable defined to set X-IBM-Intrdr-File-Encoding.

Mentioned below are the queries we have with regards to current functionality of ibm_zos_zosmf collection: -

  1. Is there a way/ work-around to explicitly set the values of z/OSMF individual (custom, standard) headers inside Ansible ibm_zos_zosmf roles?
  2. Is there a way to set custom header X-IBM-Intrdr-File-Encoding to a specific encoding scheme inside zmf_job_complete and zmf_job_query roles? This is similar to setting value for encoding parameter for zos_job_submit module. In our case, the value is IBM-939.

PS: Our client is able to handle data containing Japanese characters by making z/OSMF RESTful API calls through a Python script and looking forward to emulate the same behavior using Ansible ibm_zos_zosmf collection. If you need to look into the functioning of Python script, please let me know and I'll share the specifics.

Many thanks.