ims_command
This building block submits IMS commands. It is not related to artifacts.
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.
To indicate the IMS command to submit and the variables that it needs, you can enter a
var_ims_command
property in The deployment method step that
this building block implements, like in the
following example:
actions:
- name: RUN IMS COMMAND
short_name: IMS_COMMAND
steps:
- name: TEST STEP FOR IMS_COMMAND
short_name: TEST_IMS_COMMAND
properties:
- key: template
value: ims_command
- key: var_ims_command
value: my_var_ims_command
In this example, the value of the var_ims_command
property is
my_var_ims_command
, but it can be any other string.
The specific variables
If you specify the var_ims_command
property in a step of the deployment method,
you must indicate the values of the specific variables that it needs.
--envFile
argument of The Python deployment command. The following extract shows only the variables that are used by this building block.
my_var_ims_command:
batch:
- command: "QUERY PGM SHOW(ALL)"
plex: "PLXWZ"
- command: "DISPLAY STATUS"
plex: "PLXWZ"
ims_command
in the Ansible
z/OS IMS collection, the value of the
command variable cannot exceed 250 characters. As a workaround, you can use the
job_submit
building block with a template to run a command
that is longer than 250 characters.- For Ansible, indicate the value in the Ansible environment variables file, under the
environment_vars root, like in the following
example:
environment_vars: STEPLIB: 'DFSF10.SDFSRESL'
- For Python, export the value with the EXPORT command, like in the following
example:
Set this environment variable with the other environment variables. For more information, see Installing Wazi Deploy.export STEPLIB=DFSF10.SDFSRESL
If you do not indicate the var_ims_command
property in a step of the deployment
method, then the values of the default ims_command_default variable from an
environment variables file are used.
ims_command_default:
command: "QUERY PGM SHOW(ALL)"
plex: "PLXWZ"
route:
- "IMWZ"
ims_output
that contains a type_2_response.CC
field and if your command fails, you can enter the value of the returned completion code
(CC
) in the success_type_2_response_cc_list
parameter. The command
will then be successful.my_var_ims_command:
batch:
- command: "UPD PGM NAME(RPPPGM) START(REFRESH)"
plex: "PLEX1"
If the program is not loaded, the command fails with a completion
code (CC
) 220
.220
in the success_type_2_response_cc_list
parameter. So, enter the following code:my_var_ims_command:
batch:
- command: "UPD PGM NAME(RPPPGM) START(REFRESH)"
plex: "PLEX1"
success_type_2_response_cc_list:
- '220'
A warning in the console indicates that some errors have been
ignored.The Wazi Deploy conditional deployment provides this type of operation and other particular processing.
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.