We are excited to share that AWS has open sourced its AWS Mainframe Modernization CardDemo application for use by the community modernizing mainframe applications.
CardDemo is a sample mainframe application. It is designed and developed to test AWS Mainframe Modernization and partner technology for many modernization use cases such as discovery, migration, modernization, performance test, augmentation, service enablement, service extraction, test creation, test harness, etc. It can be used to showcase modernization using patterns such as automated refactor, replatform, and augmentation. Since it is a relatively small standalone application which uses synthetic data, CardDemo enables our customers and partners to test, evaluate, and show solutions without the risk of exposing customer business logic and data to the public.
By open sourcing CardDemo under the Apache 2.0 license, we want to empower builders and foster innovation around the modernization of mainframe applications. With the CardDemo mainframe application, you can quickly experiment with new solutions and integrations. We also want to develop the knowledge of solutions for modernizing mainframe applications by learning from workshops, tutorials, or demonstrations leveraging CardDemo.
In this post, we describe the functions, the technical components and the structure of the CardDemo application. Then we show how to install the application on a mainframe. Finally, we highlight some additional resources that help understand how you can modernize this application using cloud technology and contribute to this open source application.
Overview of CardDemo
CardDemo is a mainframe credit card management application that allows you to view and update account information, credit card data and transactions for a given date range. You interact with the frontend through typical mainframe green screens using one of two personas:
A back-office user who can view and update a restricted set of account and credit card attributes, create transactions manually, and view reports on transactions.
An administrator who can view, add, update, and delete other users.
A series of batch jobs is included in CardDemo. You can run this batch cycle to process transaction data received from a simulated external transaction feed file. The batch posts transactions, performs interest calculations on outstanding balances and produces reports and extracts that it stores for later reference.
To help you get started with CardDemo, we have provided a starter database populated with synthetic data. The key entities in this system are Account, Customers associated with the account and Cards owned by the account. Visit this link to see the entity relationship diagram.
Though it is possible to have many-to-many relationships between these three entities, we have constrained ourselves to a 1:1:1 relationship between them in the first release. This means that one account can be associated with at most one card and one person.
The CardDemo application is composed of the following components:
Basic Mapping Support (BMS) maps written using the assembler language macro instructions (macros) to create the screens.
Virtual Storage Access Method to store the data. In addition to VSAM, the application also makes use of physical sequential (PS) datasets and generation data groups (GDGs).
Common Business Oriented Language (COBOL) for the logic to perform edits and execute business processes.
The application has two flows based on the type of user logging in to the CardDemo login screen.
Back-office user flow
When you login as a back-office user to the application, it displays the main menu which gives you the ability to choose from several options to perform various application functions. As a back-office user you can manage accounts, credit cards, transactions and bill payments.
When you log in as an administrator, the admin menu provides a set of options to list, add, update, and delete users.
The README file in the CardDemo GitHub repository has detailed step-by-step instructions about how to install CardDemo on a mainframe.
Here is a high-level overview of the installation process.
Retrieve the repository from GitHub and upload the supplied code and data to the mainframe.
Compile screens and batch programs.
Define CICS resources used by CardDemo.
Start the application and begin testing CardDemo.
Step 1: Uploading and organizing the GitHub artifacts on the mainframe
Take the code under the app folder of the repository and upload it to the mainframe.
Upload the provided sample data usinge a binary mode of transfer.
Run jobs listed in Step 3 of the installation process in the README file to re-structure the raw data provided so that it fits the format that CardDemo expects (VSAM, physical sequential files, and GDG groups.)
Step 2: Compiling the programs
Obtain JCLs to compile maps, CICS programs and batch COBOL from your mainframe administrator. We have provided sample JCLs for reference.
Execute the following steps:
Compile the maps in the BMS folder.
Compile programs starting with CO using your CICS COBOL compile job.
Compile batch programs starting with CB using the COBOL only compiler.
Step 3: Creating CICS Resource Definitions
Once you finish compiling the programs, you need to make CICS aware of the resources created. Follow the instructions under bullet 5 of the README file to do this.
You can either:
Use the batch system definition utility (DFHCSDUP) to import the CardDemo CSD file
Or use the online resource definition program CEDA to define all the transactions, files, and transient storage queues required by CICS.
Step 4: Start using CardDemo
Clear the CICS screen and type CC00 to invoke the CardDemo main menu screen.
If you see a menu screen prompting you for a User ID and Password, you have successfully installed CardDemo.
To use the application as a back-office user, login with id USER0001 and password PASSWORD.
To use the application as an administrator, log in with id ADMIN001 and password PASSWORD.
Overview of programs provided with CardDemo
The README file has an documented the purpose of each program provided with CardDemo.
Here is a brief overview of the functions provided:
Initial Screen: From the frontend perspective, the first transaction that you encounter in CardDemo is the sign-on screen shown previously. This is where you choose whether you are logging in as a back office or admin user.
Main Menu: If you log in as a back-office user, you see a user function menu. You can configure which programs appear in each slot of this menu by editing a copybook.
3. Admin Menu: If on the other hand, you log in as an administrator, you will see a list of administration functions. This too is a configurable menu which is initially setup to show four functions for managing CardDemo users.
Batch: As is typical in mainframe applications, CardDemo has a batch process to perform calculations. CardDemo expects you to stop all online activity and close the files opened to CICS while batch is in progress.
The batch refreshes data in the application files and then posts transactions received to accounts before calculating interest on outstanding balances.
You can find instructions to set up and run this process under the heading Running Full Batch in the README file and you can review the impact of the batch by comparing the account balances before and after running it.
Congratulations!! You have setup CardDemo and are ready to start with your own use cases.
By open sourcing CardDemo, we want to make it easier for our customers, partners, and for the mainframe community to learn and experiment with mainframe code and to understand solutions for modernizing mainframe applications.
We also invite builders everywhere to add their own extensions and features to this CardDemo code base. If you would like to add features and contribute to the further development of CardDemo, you are welcome to submit your code for inclusion in CardDemo following the guidelines we have provided for you in this contribution guide.
You can learn more about the AWS Mainframe Modernization service and see CardDemo in action in the following webinars:
AWS Mainframe Modernization Blu Age Refactor with CardDemo demonstration
AWS Mainframe Modernization Micro Focus Replatform with CardDemo demonstration