forked from kiera-bennett/cics-cobol-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_application.yml
51 lines (45 loc) · 1.35 KB
/
build_application.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# (c) Copyright IBM Corp. 2024
# Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0)
---
- name: Compile COBOL application
hosts: all
gather_facts: false
environment: "{{ environment_vars }}"
vars:
load_data_set: "HUGHEA.COBOL.LOAD"
src_data_set: "HUGHEA.COBOL.SOURCE"
member_name: HELLO
jcl_data_set: "HUGHEA.COBOL.JCL"
tasks:
- name: Create data set for cobol source
ibm.ibm_zos_core.zos_data_set:
name: "{{ src_data_set }}"
type: pdse
replace: true
- name: Create data set for compiled cobol
ibm.ibm_zos_core.zos_data_set:
name: "{{ load_data_set }}"
type: pdse
record_format: u
replace: true
- name: Copy local COBOL source to data set
ibm.ibm_zos_core.zos_copy:
src: "{{ playbook_dir }}/hello.cbl"
dest: "{{ src_data_set }}({{ member_name }})"
force: true
encoding:
from: ISO8859-1
to: IBM-1047
- name: Copy JCL to data set
ibm.ibm_zos_core.zos_copy:
src: "{{ playbook_dir }}/compile.j2"
dest: "{{ jcl_data_set }}"
force: true
use_template: true
encoding:
from: ISO8859-1
to: IBM-1047
- name: Submit JCL
ibm.ibm_zos_core.zos_job_submit:
src: "{{ jcl_data_set }}"
register: compile_output