forked from OCamlPro/aws-mainframe-modernization-carddemo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.md.old
324 lines (234 loc) · 14.3 KB
/
README.md.old
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
## CardDemo -- Mainframe CardDemo Application
- [CardDemo -- Mainframe CardDemo Application](#carddemo----mainframe-card-demo-application)
- [Description](#description)
- [Technologies used](#technologies-used)
- [Installation on the mainframe](#installation-on-the-mainframe)
- [Application Details](#application-details)
- [User Functions](#user-functions)
- [Admin Functions](#admin-functions)
- [Application Inventory](#application-inventory)
- [**Online**](#online)
- [**Batch**](#batch)
- [Application Screens](#application-screens)
- [**Signon Screen**](#signon-screen)
- [**Main Menu**](#main-menu)
- [**Admin Menu**](#admin-menu)
- [Support](#support)
- [Roadmap](#roadmap)
- [Contributing](#contributing)
- [License](#license)
- [Project status](#project-status)
<br/>
## Description
CardDemo is a Mainframe application designed and developed to test and showcase AWS and partner technology for mainframe migration and modernization use-cases such as discovery, migration, modernization, performance test, augmentation, service enablement, service extraction, test creation, test harness, etc.
Note that the intent of this application is to provide mainframe coding scenarios to excercise analysis, transformation and migration tooling. So, the coding style is not uniform across the application
<br/>
## Technologies used
1. COBOL
2. CICS
3. VSAM
4. JCL
5. RACF
<br/>
## Installation on the mainframe
To install this repository on the mainframe please follow the following steps
1. Clone this repository to your local development environment
2. Create datasets on the mainframe hold the code
* It is recommended to group them under a High Level Qualifier (HLQ)for all your datasets.
* Upload the following application source folders from the main branch of git repository on to your mainframe
using $INDFILE or your preferred upload tool.
* If you have used AWS.M2 as your HLQ, you should end up with the below code structure on the mainframe
| HLQ | Name | Format | Length |
| :----- | :------------ | :----- | -----: |
| AWS.M2 | CARDDEMO.JCL | FB | 80 |
| AWS.M2 | CARDDEMO.PROC | FB | 80 |
| AWS.M2 | CARDDEMO.CBL | FB | 80 |
| AWS.M2 | CARDDEMO.CPY | FB | 80 |
| AWS.M2 | CARDDEMO.BMS | FB | 80 |
3. Use data for testing using either of the below approaches
** Use the supplied sample data**
* Upload the sample data provided in the main/-/data/EBCDIC/ folder to the mainframe. Ensure that you use transfer mode binary
| Dataset name | Name | Copybook (Layout) | Format | Length | Name of equivalent ascii file |
| :---------------------------------| :----------------------------------------------- | :----- | :----- | -----: | :---------------------------- |
| AWS.M2.CARDDEMO.USRSEC.PS | User Security file | CSUSR01Y | FB | 80 | See DEFUSR01.jcl (inline) |
| AWS.M2.CARDDEMO.ACCTDATA.PS | Account Data | CVACT01Y | FB | 300 | acctdata.txt |
| AWS.M2.CARDDEMO.CARDDATA.PS | Card Data | CVACT02Y | FB | 150 | carddata.txt |
| AWS.M2.CARDDEMO.CUSTDATA.PS | Customer Data | CVCUS01Y | FB | 500 | custdata.txt |
| AWS.M2.CARDDEMO.CARDXREF.PS | Customer Account Card Cross reference | CVACT03Y | FB | 50 | cardxref.txt |
| AWS.M2.CARDDEMO.DALYTRAN.PS.INIT | Transaction database initialization record | CVTRA06Y | FB | 350 | 1 record (low-values ending with 00000100)|
| AWS.M2.CARDDEMO.DALYTRAN.PS | Transaction data which has to go through posting | CVTRA06Y | FB | 350 | dailytran.txt |
| AWS.M2.CARDDEMO.TRANSACT.VSAM.KSDS| Transaction data entered online | CVTRA05Y | FB | 350 | not applicable |
| AWS.M2.CARDDEMO.DISCGRP.PS | Disclosure Groups | CVTRA02Y | FB | 50 | discgrp.txt |
| AWS.M2.CARDDEMO.TRANCATG.PS | Transaction Category Types | CVTRA04Y | FB | 60 | trancatg.txt |
| AWS.M2.CARDDEMO.TRANTYPE.PS | Transaction Types | CVTRA03Y | FB | 60 | trantype.txt |
| AWS.M2.CARDDEMO.TCATBALF.PS | Transaction Category Balance | CVTRA01Y | FB | 50 | tcatbal.txt |
* Execute the following JCLs in order
| Jobname | What it does |
| :------- | :-------------------------------------------------- |
| DUSRSECJ | Sets up user security vsam file |
| CLOSEFIL | Closes files opened by CICS |
| ACCTFILE | Loads Account database using sample data |
| CARDFILE | Loads Card database with credit card sample data |
| CUSTFILE | Creates customer database |
| XREFFILE | Loads Customer Card account cross reference to VSAM |
| TRANFILE | Copies initial Trasaction file to VSAM |
| DISCGRP | Copies initial Disclosure Group file to VSAM |
| TCATBALF | Copies initial TCATBALF file to VSAM |
| TRANCATG | Copies initial transaction category file to VSAM |
| TRANTYPE | Copies initial transaction type file |
| OPENFIL | Makes files available to CICS |
| DEFGDGB | Defines GDG Base |
4. Compile the Programs.
You should use the compile process followed by your mainframe shopfloor
We have however provided some sample JCLs in the samples folder in git to help you craft the JCL
5. Create resources in the CARDDEMO group in CICS
You have 2 options
Be sure to edit the HLQs in the below documents as required before you do the definition
* (Preferred) . Use the DFHCSDUP JCL that the resources required by the application
The resources required are in the CSD file provided in the CSD folder
* Group CARDDEMO
* Mapsets
* Transactions
* Maps
* Files
* Use the CEDA transaction to execute the commands in the above listing
* Define group
```shell
DEFINE LIBRARY(COM2DOLL) GROUP(CARDDEMO) DSNAME01(&HLQ..LOADLIB)
```
* Define Mapsets, Maps , Programs and Files
Sample CEDA commands
```shell
DEF PROGRAM(COCRDLIC) GROUP(CARDDEMO)
DEF MAPSET(COCRDLI) GROUP(CARDDEMO)
DEFINE PROGRAM(COSGN00C) GROUP(CARDDEMO) DA(ANY) TRANSID(CC00) DESCRIPTION(LOGIN)
DEFINE TRANSACTION(CC00) GROUP(CARDDEMO) PROGRAM(COSGN00C) TASKDATAL(ANY)
```
* Install /Load the online resources to your CICS region
```shell
CEDA INSTALL TRANS(CCLI) GROUP(CARDDEMO)
CEDA INSTALL FILE(CARDDAT) GROUP(CARDDEMO)
CECI LOAD PROG(COCRDUP)
CECI LOAD PROG(COCRDUPC)
```
* Execute a NEWCOPY of mapsets and maps
```shell
CEMT SET PROG(COCRDUP) NEWCOPY
CEMT SET PROG(COCRDUPC) NEWCOPY
```
6. Enjoy the demo
* For online functions : Start the CardDemo application using the CC00 transaction
- Enter userid ADMIN001 and the initially configured password PASSWORD to manage users
- Enter userid USER0001 and the initially configured password PASSWORD to access back office functions
* For batch : See the instructions for running full batch below.
## Running full batch
* Execute the following JCLs in order
| Jobname | What it does |
| :------- | :-------------------------------------------------- |
| CLOSEFIL | Closes files opened by CICS |
| ACCTFILE | Loads Account database using sample data |
| CARDFILE | Loads Card database with credit card sample data |
| XREFFILE | Loads Customer Card account cross reference to VSAM |
| CUSTFILE | Creates customer database |
| TRANBKP | Creates Transaction database |
| DISCGRP | Copies initial disclosure Group file to VSAM |
| TCATBALF | Copies initial TCATBALF file to VSAM |
| TRANTYPE | Copies initial transaction type file |
| DUSRSECJ | Sets up user security vsam file |
| POSTTRAN | Core processing job |
| INTCALC | Run interest calculations |
| TRANBKP | Backup Transaction database |
| COMBTRAN | Combine system transactions with daily ones |
| CREASTMT | Produce transaction statement |
| TRANIDX | Define alternate index on transaction file |
| OPENFIL | Makes files available to CICS |
<br/>
## Application Details
The CardDemo is a Credit Card management application, built primarily using COBOL programming language. The application has various functions that allows users to manage Account, Credit card, Transaction and Bill payment.
There are 2 types of users:
* Regular User
* Admin User
The Regular user can perform the user functions and the Admin users can only perform Admin functions.
<br/>
### User Functions
![Alt text](./diagrams/Application-Flow-User.png?raw=true "User Flow")
<br/>
### Admin Functions
![Alt text](./diagrams/Application-Flow-Admin.png?raw=true "Admin Flow")
<br/>
### Application Inventory
#### **Online**
| Transaction | | BMS Map | Program | Function |
| :---------- | :--- | :------ | :------- | :------------------ |
| CC00 | | COSGN00 | COSGN00C | Signon Screen |
| CM00 | | COMEN01 | COMEN01C | Main Menu |
| | CAVW | COACTVW | COACTVWC | Account View |
| | CAUP | COACTUP | COACTUPC | Account Update |
| | CCLI | COCRDLI | COCRDLIC | Credit Card List |
| | CCDL | COCRDSL | COCRDSLC | Credit Card View |
| | CCUP | COCRDUP | COCRDUPC | Credit Card Update |
| | CT00 | COTRN00 | COTRN00C | Transaction List |
| | CT01 | COTRN01 | COTRN01C | Transaction View |
| | CT02 | COTRN02 | COTRN02C | Transaction Add |
| | CR00 | CORPT00 | CORPT00C | Transaction Reports |
| | CB00 | COBIL00 | COBIL00C | Bill Payment |
| CA00 | | COADM01 | COADM01C | Admin Menu |
| | CU00 | COUSR00 | COUSR00C | List Users |
| | CU01 | COUSR01 | COUSR01C | Add User |
| | CU02 | COUSR02 | COUSR02C | Update User |
| | CU03 | COUSR03 | COUSR03C | Delete User |
#### **Batch**
| Job | Program | Function |
| :------- | :------- | :----------------------------------------- |
| DUSRSECJ | IEBGENER | Initial Load of User security file |
| DEFGDGB | IDCAMS | Setup GDG Bases |
| ACCTFILE | IDCAMS | Refresh Account Master |
| CARDFILE | IDCAMS | Refresh Card Master |
| CUSTFILE | IDCAMS | Refresh Customer Master |
| DISCGRP | IDCAMS | Load Disclosure Group File |
| TRANFILE | IDCAMS | Load Transaction Master file |
| TRANCATG | IDCAMS | Load Transaction category types |
| TRANTYPE | IDCAMS | Load Transaction type file |
| XREFFILE | IDCAMS | Account, Card and Customer cross reference |
| CLOSEFIL | IEFBR14 | Close VSAM files in CICS |
| TCATBALF | IDCAMS | Refresh Transaction Category Balance |
| TRANBKP | IDCAMS | Refresh Transaction Master |
| POSTTRAN | CBTRN02C | Transaction processing job |
| TRANIDX | IDCAMS | Define AIX for transaction file |
| OPENFIL | IEFBR14 | Open files in CICS |
| INTCALC | CBACT04C | Run interest calculations |
| COMBTRAN | SORT | Combine transaction files |
| CREASTMT | CBSTM03A | Produce transaction statement |
<br/>
### Application Screens
#### **Signon Screen**
![Alt text](./diagrams/Signon-Screen.png?raw=true "Signon Screen")
#### **Main Menu**
![Alt text](./diagrams/Main-Menu.png?raw=true "Main Menu")
#### **Admin Menu**
![Alt text](./diagrams/Admin-Menu.png?raw=true "Admin Menu")
<br/>
## Support
If you have questions or requests for improvement please raise an issue in the repository.
<br/>
## Roadmap
The following features are planned for upcoming releases
1. More database types
1. Relational Database usage : Db2
2. Hierachical database calls : IMS
2. Integration
* ftp, sftp
* Message queue integration
* Exposure of transactions for distributed application integration
<br/>
## Contributing
We are looking forward to receiving contributions and enhancements to this initial codebase from the mainframe code base
Feel free to raise issues, create code and raise merge requests for enhancements so that we can build out this application as a resource for programmers wanting to understand and modernize their mainframes.
<br/>
## License
This is intended to be a community resource and it is released under the Apache 2.0 license.
<br/>
## Project status
We are planning a v2 of this application in Q1 2023.
Watch this space for updates
<br/>