Introducing Open Source AWS CardDemo for Mainframe Modernization  

December 15, 2022 By Mark Otto 0

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:

  1. 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.
  2. 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.

CardDemo application diagram

Architecture

The CardDemo application is composed of the following components:

  1. Basic Mapping Support (BMS) maps written using the assembler language macro instructions (macros) to create the screens.
  2. 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).
  3. Common Business Oriented Language (COBOL) for the logic to perform edits and execute business processes.

CardDemo architecture diagram

Application Flow

The application has two flows based on the type of user logging in to the CardDemo login screen.

  1. Back-office user flow
  2. Administrator 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.

Back office user applicaton flow

When you log in as an administrator, the admin menu provides a set of options to list, add, update, and delete users.

CardDemo application flow for administrators

Installing CardDemo

Prerequisites

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.

  1. Retrieve the repository from GitHub and upload the supplied code and data to the mainframe.
  2. Compile screens and batch programs.
  3. Define CICS resources used by CardDemo.
  4. Start the application and begin testing CardDemo.

Step 1: Uploading and organizing the GitHub artifacts on the mainframe

  1. Take the code under the app folder of the repository and upload it to the mainframe.
  2. Upload the provided sample data usinge a binary mode of transfer.
  3. 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:

  1. Compile the maps in the BMS folder.
  2. Compile programs starting with CO using your CICS COBOL compile job.
  3. 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:

  1. Use the batch system definition utility (DFHCSDUP) to import the CardDemo CSD file
  2. 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

  1. Clear the CICS screen and type CC00 to invoke the CardDemo main menu screen.
  2. If you see a menu screen prompting you for a User ID and Password, you have successfully installed CardDemo.
  3. To use the application as a back-office user, login with id USER0001 and password PASSWORD.
  4. To use the application as an administrator, log in with id ADMIN001 and password PASSWORD.

CardDemo application login screenshot

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:

  1. 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.
  2. 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.

CardDemo screen for a back-office user

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.

CardDemo screen shot of administrator view

  1. 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.

Conclusion

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: