Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enabler] [zos_data_set] Add back default record format, new logic to handle default FB #646

Closed
ddimatos opened this issue Feb 21, 2023 · 0 comments
Assignees
Labels
Enabler Enabler task Resolved The issue is resolved, authors issue has been addressed

Comments

@ddimatos
Copy link
Collaborator

Enabler description

As a result of the later ansible versions such as 2.14 the code was updated to move the module default record format of FB. It does not make good sense to not have a default as one who does not know z/OS it could be helpful, the problem is that with such a default and the current modules design, a default record format FB will break VSAM type data sets.

Logic has been added to remove the defaults when needed but also to clean up any dangling values when batch and non-batch options are set as it can be confusing to see values for non-batch when batch is used.

Here is what a successful batch result should look like as to not confuse any one looking at log dumps , best to None out the values we don't use:

{
   "contacted":{
      "ec33017a.vmec.svl.ibm.com":{
         "_ansible_no_log":false,
         "changed":true,
         "invocation":{
            "module_args":{
               "batch":[
                  {
                     "block_size":"None",
                     "directory_blocks":5,
                     "key_length":"None",
                     "key_offset":"None",
                     "name":"USER.PRIVATE.TESTDS",
                     "record_format":"FB",
                     "record_length":"None",
                     "replace":false,
                     "sms_data_class":"None",
                     "sms_management_class":"None",
                     "sms_storage_class":"None",
                     "space_primary":5,
                     "space_secondary":3,
                     "space_type":"M",
                     "state":"present",
                     "type":"pds",
                     "volumes":"None"
                  },
                  {
                     "block_size":"None",
                     "directory_blocks":"None",
                     "key_length":"None",
                     "key_offset":"None",
                     "name":"USER.PRIVATE.TESTDS(newmem1)",
                     "record_format":"FB",
                     "record_length":"None",
                     "replace":false,
                     "sms_data_class":"None",
                     "sms_management_class":"None",
                     "sms_storage_class":"None",
                     "space_primary":5,
                     "space_secondary":3,
                     "space_type":"M",
                     "state":"present",
                     "type":"member",
                     "volumes":"None"
                  },
                  {
                     "block_size":"None",
                     "directory_blocks":"None",
                     "key_length":"None",
                     "key_offset":"None",
                     "name":"USER.PRIVATE.TESTDS(newmem2)",
                     "record_format":"FB",
                     "record_length":"None",
                     "replace":false,
                     "sms_data_class":"None",
                     "sms_management_class":"None",
                     "sms_storage_class":"None",
                     "space_primary":5,
                     "space_secondary":3,
                     "space_type":"M",
                     "state":"present",
                     "type":"member",
                     "volumes":"None"
                  },
                  {
                     "block_size":"None",
                     "directory_blocks":"None",
                     "key_length":"None",
                     "key_offset":"None",
                     "name":"USER.PRIVATE.TESTDS",
                     "record_format":"FB",
                     "record_length":"None",
                     "replace":false,
                     "sms_data_class":"None",
                     "sms_management_class":"None",
                     "sms_storage_class":"None",
                     "space_primary":5,
                     "space_secondary":3,
                     "space_type":"M",
                     "state":"absent",
                     "type":"PDS",
                     "volumes":"None"
                  }
               ],
               "block_size":"None",
               "directory_blocks":"None",
               "key_length":"None",
               "key_offset":"None",
               "name":"None",
               "record_format":"None",
               "record_length":"None",
               "replace":"None",
               "sms_data_class":"None",
               "sms_management_class":"None",
               "sms_storage_class":"None",
               "space_primary":"None",
               "space_secondary":"None",
               "space_type":"None",
               "state":"None",
               "tmp_hlq":"None",
               "type":"None",
               "volumes":"None"
            }
         },
         "message":"",
         "names":[
            "USER.PRIVATE.TESTDS",
            "USER.PRIVATE.TESTDS(NEWMEM1)",
            "USER.PRIVATE.TESTDS(NEWMEM2)",
            "USER.PRIVATE.TESTDS"
         ]
      }
   }
}

Ansible module

zos_data_set

@ddimatos ddimatos added the Enabler Enabler task label Feb 21, 2023
@ddimatos ddimatos moved this to 🔍 Validation in IBM Ansible z/OS Core Collection Feb 21, 2023
@ddimatos ddimatos added the Resolved The issue is resolved, authors issue has been addressed label Feb 21, 2023
@ddimatos ddimatos moved this from 🔍 Validation to ✅ Done in IBM Ansible z/OS Core Collection Feb 21, 2023
@ddimatos ddimatos closed this as completed Mar 3, 2023
@ddimatos ddimatos added this to the [Q1] [2023] Enablers milestone Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enabler Enabler task Resolved The issue is resolved, authors issue has been addressed
Projects
Development

No branches or pull requests

2 participants