Skip to content

Commit 2a28d28

Browse files
andrewhughes101GitHub Enterprise
authored andcommitted
Merge pull request ansible-collections#151 from CICS/csd-doc
Doc improvements and CSD updates
2 parents c413d77 + 19f7ee2 commit 2a28d28

File tree

6 files changed

+237
-1
lines changed

6 files changed

+237
-1
lines changed

docs/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Docs generated under source/modules are automatically generated.
2+
Other .rst files have to be manually updated
3+
If you are running in a devcontainer, you can run 'update-docs.py' to generate updates to the modules .rst documents
4+
Otherwise, you will need to run 'pip install -r /workspace/collections/ansible_collections/ibm/ibm_zos_cics/doc-requirements.txt'
5+
Then run, 'apt-get updates' followed by 'apt-get install make' before you can run 'update-docs.py'

docs/source/modules/auxiliary_temp.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ Parameters
8282

8383
\ :literal:`initial`\ will create the auxiliary temporary storage data set if it does not already exist.
8484

85+
\ :literal:`warm`\ will retain an existing auxiliary temporary storage data set in its current state.
86+
8587

8688

8789

docs/source/modules/csd.rst

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
.. _csd_module:
2+
3+
4+
csd -- Create, remove, and manage the CICS CSD
5+
==============================================
6+
7+
.. contents::
8+
:local:
9+
:depth: 1
10+
11+
12+
Synopsis
13+
--------
14+
15+
Create, remove, and manage the \ `csd <https://www.ibm.com/docs/en/cics-ts/6.1?topic=configuring-setting-up-shared-data-sets-csd-sysin>`__\ data set used by a CICS® region.
16+
17+
Useful when provisioning or de-provisioning a CICS region, or when managing the state of the CSD during upgrades or restarts.
18+
19+
Use the \ :literal:`state`\ option to specify the intended state for the CSD. For example, \ :literal:`state=initial`\ will create and initialize a CSD data set if it doesn't yet exist, or it will take an existing CSD and empty it of all records.
20+
21+
22+
23+
24+
25+
26+
Parameters
27+
----------
28+
29+
space_primary (False, int, 4)
30+
The size of the CSD data set's primary space allocation. Note, this is just the value; the unit is specified with \ :literal:`space\_type`\ .
31+
32+
This option only takes effect when the CSD is being created. If it already exists, it has no effect.
33+
34+
The CSD data set's secondary space allocation is set to 1.
35+
36+
37+
space_type (False, str, M)
38+
The unit portion of the CSD data set size. Note, this is just the unit; the value is specified with \ :literal:`space\_primary`\ .
39+
40+
This option only takes effect when the CSD is being created. If it already exists, it has no effect.
41+
42+
The size can be specified in megabytes (\ :literal:`M`\ ), kilobytes (\ :literal:`K`\ ), records (\ :literal:`REC`\ ), cylinders (\ :literal:`CYL`\ ), or tracks (\ :literal:`TRK`\ ).
43+
44+
45+
region_data_sets (True, dict, None)
46+
The location of the region's data sets using a template, e.g. \ :literal:`REGIONS.ABCD0001.\<\< data\_set\_name \>\>`\ .
47+
48+
49+
template (False, str, None)
50+
The base location of the region's data sets with a template.
51+
52+
53+
dfhcsd (False, dict, None)
54+
Overrides the templated location for the CSD data set.
55+
56+
57+
dsn (False, str, None)
58+
Data set name of the CSD to override the template.
59+
60+
61+
62+
63+
cics_data_sets (True, dict, None)
64+
The name of the \ :literal:`SDFHLOAD`\ data set, e.g. \ :literal:`CICSTS61.CICS.SDFHLOAD`\ .
65+
66+
67+
template (False, str, None)
68+
Templated location of the cics install data sets.
69+
70+
71+
sdfhload (False, str, None)
72+
Location of the sdfhload data set.
73+
74+
Overrides the templated location for sdfhload.
75+
76+
77+
78+
state (True, str, None)
79+
The desired state for the CSD, which the module will aim to achieve.
80+
81+
\ :literal:`absent`\ will remove the CSD data set entirely, if it already exists.
82+
83+
\ :literal:`initial`\ will create the CSD data set if it does not already exist, and initialise it using dfhcsdup
84+
85+
\ :literal:`warm`\ will retain an existing CSD in its current state.
86+
87+
88+
89+
90+
91+
92+
93+
94+
95+
Examples
96+
--------
97+
98+
.. code-block:: yaml+jinja
99+
100+
101+
- name: Initialize a CSD
102+
ibm.ibm_zos_cics.csd:
103+
region_data_sets:
104+
template: "REGIONS.ABCD0001.<< data_set_name >>"
105+
cics_data_sets:
106+
template: "CICSTS61.CICS.<< lib_name >>"
107+
state: "initial"
108+
109+
- name: Initialize a large CSD data set
110+
ibm.ibm_zos_cics.csd:
111+
region_data_sets:
112+
template: "REGIONS.ABCD0001.<< data_set_name >>"
113+
cics_data_sets:
114+
template: "CICSTS61.CICS.<< lib_name >>"
115+
space_primary: 10
116+
space_type: "M"
117+
state: "initial"
118+
119+
- name: Delete CSD
120+
ibm.ibm_zos_cics.csd:
121+
region_data_sets:
122+
template: "REGIONS.ABCD0001.<< data_set_name >>"
123+
cics_data_sets:
124+
template: "CICSTS61.CICS.<< lib_name >>"
125+
state: "absent"
126+
127+
- name: Retain existing state of CSD
128+
ibm.ibm_zos_cics.csd:
129+
region_data_sets:
130+
template: "REGIONS.ABCD0001.<< data_set_name >>"
131+
cics_data_sets:
132+
template: "CICSTS61.CICS.<< lib_name >>"
133+
state: "warm"
134+
135+
136+
137+
Return Values
138+
-------------
139+
140+
changed (always, bool, )
141+
True if the state was changed, otherwise False.
142+
143+
144+
failed (always, bool, )
145+
True if the query job failed, otherwise False.
146+
147+
148+
start_state (always, dict, )
149+
The state of the CSD before the task runs.
150+
151+
152+
vsam (always, bool, )
153+
True if the data set is a VSAM data set.
154+
155+
156+
exists (always, bool, )
157+
True if the CSD data set exists.
158+
159+
160+
161+
end_state (always, dict, )
162+
The state of the CSD at the end of the task.
163+
164+
165+
vsam (always, bool, )
166+
True if the data set is a VSAM data set.
167+
168+
169+
exists (always, bool, )
170+
True if the CSD data set exists.
171+
172+
173+
174+
executions (always, list, )
175+
A list of program executions performed during the task.
176+
177+
178+
name (always, str, )
179+
A human-readable name for the program execution.
180+
181+
182+
rc (always, int, )
183+
The return code for the program execution.
184+
185+
186+
stdout (always, str, )
187+
The standard out stream returned by the program execution.
188+
189+
190+
stderr (always, str, )
191+
The standard error stream returned from the program execution.
192+
193+
194+
195+
196+
197+
198+
Status
199+
------
200+
201+
202+
203+
204+
205+
Authors
206+
~~~~~~~
207+
208+
- Thomas Latham (@Thomas-Latham3)
209+

docs/source/modules/local_request_queue.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ Parameters
8282

8383
\ :literal:`initial`\ will create the local request queue data set if it does not already exist, and empty it of all existing records.
8484

85+
\ :literal:`warm`\ will retain an existing LRQ data set in its current state.
86+
8587

8688

8789

docs/update-docs.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import os
2+
3+
# Run doc extractor to update .rst files in modules
4+
os.system('ansible-doc-extractor ./docs/source/modules ./plugins/modules/*.py')
5+
6+
# Generate html source from .rst files
7+
os.system('make html')
8+
9+
# Open html source to verify it's correct
10+
os.system('make view html')

plugins/modules/csd.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
- V(absent) will remove the CSD data set entirely, if it
9898
already exists.
9999
- V(initial) will create the CSD data set if it does not
100-
already exist, and empty it of all existing records.
100+
already exist, and initialise it using dfhcsdup
101101
- V(warm) will retain an existing CSD in its current state.
102102
choices:
103103
- "initial"
@@ -134,6 +134,14 @@
134134
cics_data_sets:
135135
template: "CICSTS61.CICS.<< lib_name >>"
136136
state: "absent"
137+
138+
- name: Retain existing state of CSD
139+
ibm.ibm_zos_cics.csd:
140+
region_data_sets:
141+
template: "REGIONS.ABCD0001.<< data_set_name >>"
142+
cics_data_sets:
143+
template: "CICSTS61.CICS.<< lib_name >>"
144+
state: "warm"
137145
"""
138146

139147

0 commit comments

Comments
 (0)