Introducing Open Source AWS CardDemo for Mainframe Modernization  

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.

Application Flow

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

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

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

Installing CardDemo


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

Flatlogic Admin Templates banner

Announcing SQL Server to Snowflake Migration Solutions

It’s Spring (or at least it will be soon), and while nature may take the Winter off from growing it’s product, Mobilize.Net did not. As Snowflake continues to grow, SnowConvert continues to grow as well. Last month, Mobilize.Net announced SnowConvert for Oracle, the first follow-up to the immensely popular SnowConvert for Teradata. This month? It’s time for SnowConvert for SQL Server

SQL Server has been Microsoft’s database of choice since before Windows was in existence. It has provided a lightweight option for thousands of application’s back-end, and has evolved to be a comprehensive database platform for thousands of organizations. As an on-solution, SQL Server carried many developers and organization through the 90s and early 2000s. But like other on-prem solutions, the cloud has come. Even Microsoft has taken it’s database-ing to the cloud through Azure and Synapse. Snowflake has taken the lead as the Data Cloud, and SnowConvert is the best and most experienced way to help you get there. 

If you have SQL Server, I would hope the SQL you have written for SQL Server is not quite as old as the first version of windows. But even if it is and the architects of that original SQL are nowhere to be anymore, SnowConvert’s got you covered. SnowConvert automates any code the conversion of any DDL and DML that you may have to an equivalent in Snowflake. But that’s the easy part. The hard problem in a code migration for databases is the procedural code. That mean Transact SQL for MSSQL Server. And with T-SQL, SnowConvert again has you covered.

Procedures Transformed

SnowConvert can take your T-SQL to functionally equivalent JavaScript or Snowflake Scripting. Both our product page and documentation have more information on the type of transformation performed, so why not show you what that looks like on this page? Let’s take a look at really basic procedure from the Microsoft Adventure Works database and convert into functionally equivalent JavaScript. This is a procedure that does an update to a table: 

CREATE PROCEDURE [HumanResources].[uspUpdateEmployeePersonalInfo]
@BusinessEntityID [int],
@NationalIDNumber [nvarchar](15),
@BirthDate [datetime],
@MaritalStatus [nchar](1),
@Gender [nchar](1)

UPDATE [HumanResources].[Employee]
SET [NationalIDNumber] = @NationalIDNumber
,[BirthDate] = @BirthDate
,[MaritalStatus] = @MaritalStatus
,[Gender] = @Gender
WHERE [BusinessEntityID] = @BusinessEntityID;
EXECUTE [dbo].[uspLogError];

Pretty straightforward in SQL Server. But how do you replicate this functionality in JavaScript automatically? Of course, by using SnowConvert. Here’s the output transformation:

// REGION SnowConvert Helpers Code
// This section would be populated by SnowConvert for SQL Server’s JavaScript Helper Classes. If you’d like to see more of the helper classes, fill out the form on the SnowConvert for SQL Server Getting Started Page.

try {
EXEC(` UPDATE HumanResources.Employee
SET NationalIDNumber = ?
, BirthDate = ?
, MaritalStatus = ?
, Gender = ?
} catch(error) {
EXEC(`CALL dbo.uspLogError(/*** MSC-WARNING – MSCEWI4010 – Default value added ***/ 0)`);

SnowConvert creates multiple helper class functions (including the EXEC helper called in the output procedure) to recreate the functionality that is present in the source code. SnowConvert also has finely tuned error messages to give you more information about any issues that may be present. You can actually click on both of the codes in the output procedure above to see the documentation page for that error code.

Want to see the same procedure above in Snowflake Scripting? Interested in getting an inventory of code that you’d like to take the cloud? Let us know. We can help you get started and understand the codebase you’re working with. If you’re already familiar with SnowConvert in general, SnowConvert for SQL Server has all the capabilities that you’ve come to expect. From the ability to generate granular assessment data to functionally equivalent transformations built upon a semantic model of the source code, SnowConvert for SQL Server is ready to see what you can throw at it. Get started today!

Flatlogic Admin Templates banner