sequential_archive
This building block copies artifacts from a z/OS® sequential data set to a sequential backup data set. It creates the sequential backup data set if it does not exist.
It is run on the artifacts that are listed under the step that it implements in The deployment plan.
actions:
- name: ARCHIVE ARTIFACTS TO A ZOS BACKUP DATA SET
short_name: ARCHIVE_TO_ZOS
steps:
- name: TEST STEP FOR SEQUENTIAL_ARCHIVE
short_name: TEST_SEQ_ARCHIVE
properties:
- key: template
value: sequential_archive
types:
- name: 'seq'
- name: 'seqa'
is_artifact: True
This building block is related to the following artifact type: sequential data set. 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
seq_spec:
type: SEQ
space_primary: 5
space_secondary: 2
space_type: TRK
record_format: FB
record_length: 20
seq_spec_a:
type: SEQ
space_primary: 2
space_secondary: 1
space_type: TRK
record_format: FB
record_length: 15
hlq: 'NAZARE.WDEPLOY.ANSIBLE'
default_types: 'types'
types:
- type: 'seq'
is_binary: False
is_sequential: True
encoding:
from: UTF-8
to: IBM-037
# is_asa_text: False
ds:
prefix: "{{ hlq }}.SEQ"
backup_prefix: "{{ hlq }}.BACK.SEQ"
spec: "{{seq_spec}}"
- type: 'seqa'
is_binary: False
is_sequential: True
encoding:
from: UTF-8
to: IBM-037
# is_asa_text: False
ds:
prefix: "{{ hlq }}.SEQ"
backup_prefix: "{{ hlq }}.BACK.SEQ"
spec: "{{seq_spec_a}}"
Among all the variables that are shown in this extract, only some of them are used by this building block. The other variables are included so that you can copy and paste all the variables that might be relevant for other building blocks. To run this building block, you must declare 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.
- ds
-
The variable for the z/OS sequential data set, with the following embedded variables:
- backup_prefix
-
String
RequiredThe prefix of the z/OS sequential backup data set. The z/OS sequential backup data set will be the concatenation of this prefix and the artifact name.
- prefix
-
String
RequiredThe prefix of the z/OS sequential data set. The z/OS sequential data set will be the concatenation of this prefix and the artifact name.
- is_asa_text
Boolean
An is_asa_text variable for the artifacts that contain ASA control characters. If this variable is set to
Default:FalseTrue, the copy will preserve ASA control characters in the destination.This variable is incompatible with the encoding variable.
- is_binary
-
Boolean
Default:FalseAn is_binary variable set to
Trueif the artifact type corresponds to a binary file. It is mandatory for all the binary files
- is_sequential
-
Boolean
Default:FalseAn is_sequential variable set to
Trueif the artifact type corresponds to a sequential file. It is mandatory for all the sequential files
- rename_subs
- In the following example,
Dict
Use this variable 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.
patternandreplaceare regular expressions.For example, you can enter the following code:- type: 'seq' ds: prefix: "{{ hlq }}.SEQ" backup_prefix: "{{ hlq }}.BACK.SEQ" spec: "{{seq_spec}}" encoding: from: UTF-8 to: IBM-1047 # is_asa_text: False is_binary: False is_sequential: True spec: "{{seq_spec}}" rename_subs: - pattern: "CDRD(.*)" replace: "CDRP\1"
The Python variables
--envFile argument of The Python deployment command. seq_spec:
type: SEQ
primary_space: 5TRK
secondary_space: 2TRK
record_format: FB
record_length: 20
seq_spec_a:
type: SEQ
primary_space: 2TRK
secondary_space: 1TRK
record_format: FB
record_length: 15
hlq: 'NAZARE.WDEPLOY.PYTHON'
types:
- pattern: .*.SEQ$
dataset_prefix: "{{ hlq }}.SEQ"
dataset_backup_prefix: "{{ hlq }}.BACK.SEQ"
encoding:
from: UTF-8
to: IBM-037
# is_asa_text: False
is_binary: False
is_sequential: True
spec: "{{seq_spec}}"
- pattern: .*.SEQA$
dataset_prefix: "{{ hlq }}.SEQ"
dataset_backup_prefix: "{{ hlq }}.BACK.SEQ"
encoding:
from: UTF-8
to: IBM-037
# is_asa_text: False
is_binary: False
is_sequential: True
spec: "{{seq_spec_a}}"
Among all the variables that are shown in this extract, only some of them are used by this building block. The other variables are included so that you can copy and paste all the variables that might be relevant for other building blocks. To run this building block, you must declare 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.
- dataset_backup_prefix
-
String
RequiredThe prefix of the z/OS sequential backup data set. The z/OS sequential backup data set will be the concatenation of this prefix and the artifact name.
- dataset_prefix
-
String
RequiredThe prefix of the z/OS sequential data set. The z/OS sequential data set will be the concatenation of this prefix and the artifact name.
- is_asa_text
Boolean
An is_asa_text variable for the artifacts that contain ASA control characters. If this variable is set to
Default:FalseTrue, the copy will preserve ASA control characters in the destination.This variable is incompatible with the encoding variable.
- is_binary
-
Boolean
Default:FalseAn is_binary variable set to
Trueif the artifact type corresponds to a binary file. It is mandatory for all the binary files
- rename_subs
-
Dict
Use this variable 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,
patternandreplaceare regular expressions.For example, you can enter the following code:- pattern: .*.SEQ$ dataset_prefix: "{{ hlq }}.SEQ" dataset_backup_prefix: "{{ hlq }}.BACK.SEQ" encoding: from: UTF-8 to: IBM-037 # is_asa_text: False is_binary: False is_sequential: True spec: "{{seq_spec}}" 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.