Skip to content

Commit 8e1de0d

Browse files
[Documentation] [zos_copy] [zos_mvs_raw] [zos_tso_cmd] Tell users how to recall migrated data sets (#2098)
* Update docs * Add changelog fragment * Fix changelog fragment * Update changelogs/fragments/2098-docs-migrated-data-sets-examples.yml Co-authored-by: Fernando Flores <[email protected]> --------- Co-authored-by: Fernando Flores <[email protected]>
1 parent a738b4a commit 8e1de0d

File tree

7 files changed

+56
-1
lines changed

7 files changed

+56
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
trivial:
2+
- zos_copy - Added a note to the documentation redirecting users to other
3+
modules to see how to recall migrated data sets before trying to copy
4+
them.
5+
(https://github.com/ansible-collections/ibm_zos_core/pull/2098)
6+
- zos_mvs_raw - Added an example for how to recall a migrated data set.
7+
(https://github.com/ansible-collections/ibm_zos_core/pull/2098)
8+
- zos_tso_cmd - Added an example for how to recall a migrated data set.
9+
(https://github.com/ansible-collections/ibm_zos_core/pull/2098)

docs/source/modules/zos_copy.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ Notes
930930

931931
It is the playbook author or user's responsibility to ensure they have appropriate authority to the RACF FACILITY resource class. A user is described as the remote user, configured either for the playbook or playbook tasks, who can also obtain escalated privileges to execute as root or another user.
932932

933-
To use this module, you must define the RACF FACILITY class profile and allow READ access to RACF FACILITY profile MVS.MCSOPER.ZOAU. If your system uses a different security product, consult that product's documentation to configure the required security classes.
933+
If trying to copy a migrated data set, first recall it before executing this module. This module does not perform recalls automatically. See modules `zos_mvs_raw <./zos_mvs_raw.html>`_ and `zos_tso_cmd <./zos_tso_cmd.html>`_ for examples of how to recall migrated data sets using this collection.
934934

935935

936936

@@ -941,6 +941,8 @@ See Also
941941

942942
- :ref:`zos_fetch_module`
943943
- :ref:`zos_data_set_module`
944+
- :ref:`zos_mvs_raw_module`
945+
- :ref:`zos_tso_cmd_module`
944946

945947

946948

docs/source/modules/zos_mvs_raw.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,6 +1809,20 @@ Examples
18091809
dd_name: sysin
18101810
content: " LISTCAT ENTRIES('SOME.DATASET.*')"
18111811

1812+
- name: Recall a migrated data set.
1813+
zos_mvs_raw:
1814+
program_name: ikjeft01
1815+
auth: true
1816+
dds:
1817+
- dd_output:
1818+
dd_name: systsprt
1819+
return_content:
1820+
type: text
1821+
- dd_input:
1822+
dd_name: systsin
1823+
content:
1824+
- "HRECALL 'MY.DATASET' WAIT"
1825+
18121826

18131827

18141828

docs/source/modules/zos_tso_command.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ Examples
9898
ALLOCATE DDNAME(OUT1) DSNAME('HLQ.PDSE.DATA.DEST(OUTPUT)') SHR;
9999
OCOPY INDD(IN1) OUTDD(OUT1) BINARY;
100100

101+
- name: Recall a migrated data set.
102+
zos_tso_command:
103+
commands:
104+
- HRECALL 'MY.DATASET' WAIT
105+
101106

102107

103108

plugins/modules/zos_copy.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,9 +563,15 @@
563563
described as the remote user, configured either for the playbook or
564564
playbook tasks, who can also obtain escalated privileges to execute as
565565
root or another user.
566+
- If trying to copy a migrated data set, first recall it before executing this module.
567+
This module does not perform recalls automatically. See modules L(zos_mvs_raw,./zos_mvs_raw.html)
568+
and L(zos_tso_cmd,./zos_tso_cmd.html) for examples of how to recall migrated data sets
569+
using this collection.
566570
seealso:
567571
- module: zos_fetch
568572
- module: zos_data_set
573+
- module: zos_mvs_raw
574+
- module: zos_tso_cmd
569575
"""
570576

571577
EXAMPLES = r"""

plugins/modules/zos_mvs_raw.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,6 +1637,20 @@
16371637
- dd_input:
16381638
dd_name: sysin
16391639
content: " LISTCAT ENTRIES('SOME.DATASET.*')"
1640+
1641+
- name: Recall a migrated data set.
1642+
zos_mvs_raw:
1643+
program_name: ikjeft01
1644+
auth: true
1645+
dds:
1646+
- dd_output:
1647+
dd_name: systsprt
1648+
return_content:
1649+
type: text
1650+
- dd_input:
1651+
dd_name: systsin
1652+
content:
1653+
- "HRECALL 'MY.DATASET' WAIT"
16401654
"""
16411655

16421656
from ansible_collections.ibm.ibm_zos_core.plugins.module_utils.better_arg_parser import (

plugins/modules/zos_tso_command.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@
134134
ALLOCATE DDNAME(IN1) DSNAME('HLQ.PDSE.DATA.SRC(INPUT)') SHR;
135135
ALLOCATE DDNAME(OUT1) DSNAME('HLQ.PDSE.DATA.DEST(OUTPUT)') SHR;
136136
OCOPY INDD(IN1) OUTDD(OUT1) BINARY;
137+
138+
- name: Recall a migrated data set.
139+
zos_tso_command:
140+
commands:
141+
- HRECALL 'MY.DATASET' WAIT
137142
"""
138143

139144
from ansible.module_utils.basic import AnsibleModule

0 commit comments

Comments
 (0)