csd – Create, remove, and manage the CICS CSD
Synopsis
Create, remove, and manage the CICS system definition data set (CSD) used by a CICS® region.
You can use this module when provisioning or de-provisioning a CICS region, or when managing the state of the CSD during upgrades or restarts.
Use the
state
option to specify the intended state for the CSD. For example,state=initial
will create and initialize a CSD if it doesn’t exist, or it will take an existing CSD and empty it of all records.
Parameters
- cics_data_sets
The name of the
SDFHLOAD
library of the CICS installation, for example,CICSTS61.CICS.SDFHLOAD
.required: Truetype: dict- sdfhload
The location of the
SDFHLOAD
library to override the template.required: Falsetype: str- template
The templated location of the
SDFHLOAD
library.required: Falsetype: str
- region_data_sets
The location of the region data sets to be created using a template, for example,
REGIONS.ABCD0001.<< data_set_name >>
.required: Truetype: dict- dfhcsd
Overrides the templated location for the CSD.
required: Falsetype: dict- dsn
The data set name of the CSD to override the template.
required: Falsetype: str
- template
The base location of the region data sets with a template.
required: Falsetype: str
- script_location
The type of location to load the DFHCSDUP script from.
DATA_SET
will load from a data set a PDS, PDSE, or sequential data set.USS
will load from a file on UNIX System Services (USS).LOCAL
will load from a file local to the ansible control node. NOT SUPPORTED IN THIS BETA.required: Falsetype: strdefault: DATA_SETchoices: DATA_SET, USS, LOCAL- script_src
The path to the source file containing the DFHCSDUP script to submit.
It could be a data set.(e.g “MY.HLQ.SOME.DEFS”,”MY.HLQ.SOME(DEFS)”).
Or a USS file (e.g “/u/tester/demo/sample.csdup”).
Or a LOCAL file (e.g “/User/tester/ansible-playbook/script.csdup”). NOT SUPPORTED IN THIS BETA.
required: Falsetype: str- space_primary
The size of the primary space allocated to the CSD. Note that this is just the value; the unit is specified with
space_type
.This option takes effect only when the CSD is being created. If the CSD already exists, the option has no effect.
required: Falsetype: intdefault: 4- space_secondary
The size of the secondary space allocated to the CSD. Note that this is just the value; the unit is specified with
space_type
.This option takes effect only when the CSD is being created. If the CSD already exists, the option has no effect.
required: Falsetype: intdefault: 1- space_type
The unit portion of the CSD size. Note that this is just the unit; the value is specified with
space_primary
.This option takes effect only when the CSD is being created. If the CSD already exists, the option has no effect.
The size can be specified in megabytes (
M
), kilobytes (K
), records (REC
), cylinders (CYL
), or tracks (TRK
).required: Falsetype: strdefault: Mchoices: M, K, REC, CYL, TRK- state
The intended state for the CSD, which the module will aim to achieve.
absent
will remove the CSD entirely, if it already exists.initial
will create the CSD if it does not already exist, and initialize it by using DFHCSDUP.warm
will retain an existing CSD in its current state.script
will run a DFHCSDUP script to update an existing CSD.required: Truetype: strchoices: initial, absent, warm, script
Examples
- name: Initialize a CSD
ibm.ibm_zos_cics.csd:
region_data_sets:
template: "REGIONS.ABCD0001.<< data_set_name >>"
cics_data_sets:
template: "CICSTS61.CICS.<< lib_name >>"
state: "initial"
- name: Initialize a large CSD data set
ibm.ibm_zos_cics.csd:
region_data_sets:
template: "REGIONS.ABCD0001.<< data_set_name >>"
cics_data_sets:
template: "CICSTS61.CICS.<< lib_name >>"
space_primary: 10
space_type: "M"
state: "initial"
- name: Delete a CSD
ibm.ibm_zos_cics.csd:
region_data_sets:
template: "REGIONS.ABCD0001.<< data_set_name >>"
cics_data_sets:
template: "CICSTS61.CICS.<< lib_name >>"
state: "absent"
- name: Retain existing state of CSD
ibm.ibm_zos_cics.csd:
region_data_sets:
template: "REGIONS.ABCD0001.<< data_set_name >>"
cics_data_sets:
template: "CICSTS61.CICS.<< lib_name >>"
state: "warm"
- name: Run a DFHCSDUP script from a data set
ibm.ibm_zos_cics.csd:
region_data_sets:
template: "REGIONS.ABCD0001.<< data_set_name >>"
cics_data_sets:
template: "CICSTS61.CICS.<< lib_name >>"
state: "script"
script_src: "MY.HLQ.SOME.DEFS"
- name: Run a DFHCSDUP script from a USS file
ibm.ibm_zos_cics.csd:
region_data_sets:
template: "REGIONS.ABCD0001.<< data_set_name >>"
cics_data_sets:
template: "CICSTS61.CICS.<< lib_name >>"
script_src: "/path/to/my/defs.csdup"
script_location: "USS"
Return Values
- changed
True if the state was changed, otherwise False.returned: alwaystype: bool- failed
True if the Ansible task failed, otherwise False.returned: alwaystype: bool- start_state
The state of the CSD before the Ansible task runs.returned: alwaystype: dict
- data_set_organization
The organization of the data set at the start of the Ansible task.returned: alwaystype: strsample: VSAM- exists
True if the CSD exists.returned: alwaystype: bool- end_state
The state of the CSD at the end of the Ansible task.returned: alwaystype: dict
- data_set_organization
The organization of the data set at the end of the Ansible task.returned: alwaystype: strsample: VSAM- exists
True if the CSD exists.returned: alwaystype: bool- executions
A list of program executions performed during the Ansible task.returned: alwaystype: list
- name
A human-readable name for the program execution.returned: alwaystype: str- rc
The return code for the program execution.returned: alwaystype: int- stdout
The standard out stream returned by the program execution.returned: alwaystype: str- stderr
The standard error stream returned from the program execution.returned: alwaystype: str