- CARDDEMO -- Mainframe Card Demo Application
- Description
- Technologies used
- Installation on the mainframe
- Application Details
- Support
- Roadmap
- Contributing
- License
- Project status
Card Demo 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 exercise analysis, transformation and migration tooling. So, the coding style is not uniform across the application
- COBOL
- CICS
- VSAM
- JCL
- RACF
To install this repository on the mainframe please follow the following steps
-
Clone this repository to your local development environment
-
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
-
-
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 Format Length Name of equivalent ascii file AWS.M2.CARDDEMO.USRSEC.PS User Security file FB 80 AWS.M2.CARDDEMO.ACCTDATA.PS Account Data FB 300 acctdata.txt AWS.M2.CARDDEMO.CARDDATA.PS Card Data FB 150 carddata.txt AWS.M2.CARDDEMO.CUSTDATA.PS Customer Data FB 500 custdata.txt AWS.M2.CARDDEMO.CARDXREF.PS Customer Account Card Cross reference FB 50 cardxref.txt AWS.M2.CARDDEMO.DALYTRAN.PS.INIT Transaction database initialization record FB 350 AWS.M2.CARDDEMO.DALYTRAN.PS Transaction data which has to go through posting FB 350 dailytran.txt AWS.M2.CARDDEMO.DISCGRP.PS Disclosure Groups FB 50 discgrp.txt AWS.M2.CARDDEMO.TRANCATG.PS Transaction categories FB 60 trancatg.txt AWS.M2.CARDDEMO.TRANTYPE.PS Transaction Types FB 60 trantype.txt AWS.M2.CARDDEMO.TCATBALF.PS Transaction Category Balance 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
-
-
Compile the Programs.
You should use the compile process followed by your mainframe shopfloor
We have however provided some sample JCLs in UTIL folders in git to help you craft the JCL
-
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
DEFINE LIBRARY(COM2DOLL) GROUP(CARDDEMO) DSNAME01(&HLQ..LOADLIB)
-
Define Mapsets, Maps , Programs and Files
Sample CEDA commands
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
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
CEMT SET PROG(COCRDUP) NEWCOPY CEMT SET PROG(COCRDUPC) NEWCOPY
-
-
Enjoy the demo
- For online functions : Start the credit card demo application using the CC00 transaction
- For running batch : Use the JCLs described in the JCL dataset
-
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 TRANIDX Define alternate index on transaction file OPENFIL Makes files available to CICS
The CardDemo is a Credit Card management application, built primarily using COBOL programming language. The application has various functions that allow 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.
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 |
Job | Program | Function |
---|---|---|
CBTRNLDJ | CBTRNLDC | Load Transactions |
CBTRNRPJ | CBTRNRPC | Reports |
ACCTFILE | IDCAMS | Refresh Account Master |
CARDFILE | IDCAMS | Refresh Card Master |
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 |
If you have questions or requests for improvement please raise a ticket .... TBD
The following features are planned for upcoming releases
-
More database types
-
Relational database usage : Db2
-
Hierachical database calls : IMS
-
-
Integration
-
ftp, sftp
-
Message queue integration
-
Exposure of transactions for distributed application integration
-
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.
This is intended to be a community resource and it is released under the Apache 2.0 license.
We are planning a v2 of this application in October 2022.
Watch this space for updates