Skip to content

Commit 3d248c4

Browse files
[Bugfix][1201]Zos_mvs_raw_ignores_tmp_hlq (#1320)
* Add first iteration * Fix mvs_raw * Add another format * Add define * Add parms to avoid fails * Quick fix to not avoid tmphlq * Fix sanity issues * Fix white spaces * Return call of hlq * Add fragment * Fix capital letters * Change fragment * Fix case sensitive data set * Fix not exist dataset * Return dataset * Fix upper case for latest dataset and change of datasize from dtouch * Fix upper case and lower case * Change typo * Fix documentation * Fix not match * Unit testing to uppercase * Fis uppercases in mvs raw * Add uppercase * New problem ID * Remove unnecesary function and add KSDS solution
1 parent 5f743e6 commit 3d248c4

File tree

5 files changed

+210
-229
lines changed

5 files changed

+210
-229
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bugfixes:
2+
- zos_mvs_raw - The module ignored the value of `tmp_hlq` option when creating temporary data sets.
3+
Fix now honors the value if provided and uses it as High Level Qualifier for temporary data sets created
4+
during the module execution.
5+
(https://github.com/ansible-collections/ibm_zos_core/pull/1320).

plugins/module_utils/zos_mvs_raw.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class MVSCmd(object):
2424
"""
2525

2626
@staticmethod
27-
def execute(pgm, dds, parm="", debug=False, verbose=False):
27+
def execute(pgm, dds, parm="", debug=False, verbose=False, tmp_hlq=None):
2828
"""Execute an unauthorized MVS command.
2929
3030
Args:
@@ -36,9 +36,10 @@ def execute(pgm, dds, parm="", debug=False, verbose=False):
3636
MVSCmdResponse: The response of the command.
3737
"""
3838
module = AnsibleModuleHelper(argument_spec={})
39-
command = "mvscmd {0} {1} {2} ".format(
39+
command = "mvscmd {0} {1} {2} {3}".format(
4040
"-d" if debug else "",
4141
"-v" if verbose else "",
42+
"--tmphlq={0}".format(tmp_hlq.upper()) if tmp_hlq else "",
4243
MVSCmd._build_command(pgm, dds, parm),
4344
)
4445
rc, out, err = module.run_command(command)
@@ -64,7 +65,6 @@ def execute_authorized(pgm, dds, parm="", debug=False, verbose=False, tmp_hlq=No
6465
"--tmphlq={0}".format(tmp_hlq.upper()) if tmp_hlq else "",
6566
MVSCmd._build_command(pgm, dds, parm),
6667
)
67-
6868
rc, out, err = module.run_command(command)
6969
return MVSCmdResponse(rc, out, err)
7070

0 commit comments

Comments
 (0)