cics_cmci_prog_delete
This building block deletes load modules from a CICS® environment.
It is run on the artifacts that are listed under the step that it implements in The deployment plan.
actions:
- name: DELETE LOAD MODULES
short_name: DELETE_MODULES
states:
- DELETED
steps:
- name: TEST STEP FOR PROG_DELETE
short_name: TEST_DELETE
properties:
- key: template
value: cics_cmci_prog_delete
types:
- name: 'CICSLOAD'
is_artifact: True
This building block is related to the following artifact type: CICS load module. The name that you give to this artifact type corresponds to the extension of this artifact in the package file. You can freely choose this extension name.
To run correctly, this building block requires environment variables. Indicate them in a .yml file. Indicate The generic environment variables for the Ansible and Python building blocks and adapt their values to your target z/OS environment. Indicate also the variables that are specific to this building block.
The Ansible variables
common_pds_load_spec:
type: LIBRARY
space_primary: 10
space_secondary: 20
space_type: CYL
record_format: U
record_length: 0
cmci_password_var: '{{ansible_password if ansible_password is defined else None}}'
cics_sys_def:
cmci_host: HOST_NAME
cmci_port: 1490
# cmci_cert:
# cmci_key:
cmci_user: IBMUSER
cmci_password: 'cmci_password_var'
context: CICS01
scheme: http
# scope:
insecure: true
timeout: "{{default_timeout}}"
csd_group: GENASAP
hlq: 'NAZARE.WDEPLOY.ANSIBLE'
default_types: 'types'
default_copy_by_folder: False
default_cics_cmci_action: 'PHASEIN'
default_timeout: 300
types:
- type: 'CICSLOAD'
copy_by_folder: '{{default_copy_by_folder}}'
pds:
name: '{{ hlq }}.LOADLIB'
spec: "{{common_pds_load_spec}}"
backup: '{{ hlq }}.BACK.LOADLIB'
is_load: True
aliases: True
force_lock: True
cics_systems:
- "{{ cics_sys_def }}"
-
The CICS system definition (cics_sys_def) of each cics_system that is used by the artifact types listed in the types root.
Define the variables that correspond to the parameters of the actions in the CICS management client interface (CMCI) modules of Ansible.
The following table relates each Wazi Deploy variable to the corresponding Ansible action:Wazi Deploy variables Ansible action parameters cics_sys_def.cmci_host cmci_host
cics_sys_def.cmci_port cmci_port
cics_sys_def.cmci_cert (optional) cmci_cert
cics_sys_def.cmci_key (optional) cmci_key
cics_sys_def.cmci_user cmci_user
cics_sys_def.cmci_password cmci_password
cics_sys_def.context context
cics_sys_def.scheme (optional) scheme
cics_sys_def.scope (optional) scope
cics_sys_def.insecure (optional) insecure
cics_sys_def.timeout (optional) timeout
The parameters of the actions for the CMCI modules of Ansible are documented in
cmci_update
andcmci_delete
.In the cics_sys_def.csd_group, you must specify the name of the CICS system definition (CSD) group that is used to delete CICS load modules.
- The variables related to the artifact types.
Enter the name of the root that lists the types and characteristics of the artifacts to be deployed, if the building block applies to artifacts. By default, the root name is types but you can enter any other name if you define a var_type property in the deployment method step that is implemented by the building block. See The types variable.
Under this root, create a type variable for each artifact type that relates to this building block in the generated deployment plan. The value of each artifact type comes from the deployment method, where it is freely chosen.
Enter the following variables for each type variable:- One or more CICS systems (cics_sys_def).
- A rename_subs variable if you
want to rename some artifacts for the deployment. Then, the building block will process these artifacts under names that
are different from the names in the application package.In the following example,
pattern
andreplace
are regular expressions.- type: 'JCL' copy_by_folder: '{{default_copy_by_folder}}' pds: name: '{{ hlq }}.JCL' spec: "{{common_pds_text_spec}}" backup: '{{ hlq }}.BACK.JCL' encoding: from: UTF-8 to: IBM-1047 rename_subs: - pattern: "CDRD(.*)" replace: "CDRP\1"
The Python variables
--envFile
argument of The Python deployment command. common_pds_load_spec:
type: LIBRARY
primary_space: 10CYL
secondary_space: 20CYL
record_format: U
record_length: 0
cics_sys_def:
cicsplex: "CICS01"
cmci_url: "CMCI_URL"
cmci_user: ""
cmci_password: ""
cmci_action: "{{default_cics_cmci_action}}"
timeout: "{{default_timeout}}"
csd_group: "GENASAP"
hlq: 'NAZARE.WDEPLOY.PYTHON'
default_cics_cmci_action: "NEWCOPY"
default_timeout: 300
types:
- pattern: .*\.CICSLOAD$
dataset: "{{ hlq }}.LOADLIB"
dataset_backup: "{{ hlq }}.BACK.LOADLIB"
spec: "{{ common_pds_load_spec }}"
is_load: True
aliases: True
cics_systems:
- "{{ cics_sys_def }}"
-
The CICS system definition (cics_sys_def) of each cics_system that is used by the artifact types listed in the types root.The CICS system definition contains the following variables:
- cics_sys_def.cicsplex
- cics_sys_def.cmci_url
- cics_sys_def.cmci_user
- cics_sys_def.cmci_password
- cics_sys_def.csd_group
- cics_sys_def.timeout
- The variables related to the artifact types.
Enter the name of the root that lists the types and characteristics of the artifacts to be deployed, if the building block applies to artifacts. By default, the root name is types but you can enter any other name if you define a var_type property in the deployment method step that is implemented by the building block. See The types variable.
Under this root, create a pattern variable for each artifact type that relates to this building block in the deployment plan. The value of each artifact type comes from the deployment method, where it is freely chosen. A pattern is a regular expression that selects the artifacts from their path in The application manifest file.
Enter the following variables for each pattern variable:- One or more CICS systems (cics_sys_def).
- A rename_subs variable if you
want to rename some artifacts for the deployment. Then, the building block will process these artifacts under names that
are different from the names in the application package.In the following example,
pattern
andreplace
are regular expressions.- pattern: .\*.JCL$ dataset: "{{ hlq }}.JCL" dataset_backup: "{{ hlq }}.BACK.JCL" spec: "{{ common_pds_txt_spec }}" encoding: from: UTF-8 to: IBM-1047 rename_subs: - pattern: "CDRD(.*)" replace: "CDRP\1"
Return values
The result of each building block task is displayed in the evidence file, in The results level that is embedded in step_result.