aws-samples/aws-mainframe-modernization-carddemo

A comprehensive COBOL mainframe credit card management application designed to showcase AWS mainframe modernization technologies and migration patterns.

272

stars

32

commits

COBOL

primary language

Oct 16, 2025

updated

aws.amazon.com/transform/mainframe/
aws-carddemo
aws-mainframe-modernization
aws-transform
mainframe
modernization
open-source

README

CardDemo - Mainframe Credit Card Management Application

Version License

Executive Summary

CardDemo is a comprehensive mainframe application that simulates a credit card management system. Designed specifically to showcase AWS and partner technologies for mainframe migration and modernization scenarios, it provides a realistic environment for testing various modernization approaches including discovery, migration, performance testing, service enablement, and more.

Table of Contents

Description

CardDemo is a mainframe application designed to test and showcase AWS and partner technology for mainframe migration and modernization use-cases. It provides a realistic environment for:

  • Application discovery and analysis
  • Migration assessment and planning
  • Modernization strategy development
  • Performance testing
  • System augmentation
  • Service enablement and extraction
  • Test creation and automation

The application intentionally incorporates various coding styles and patterns to exercise analysis, transformation, and migration tooling across different mainframe programming paradigms.

Technologies

Core Technologies

  • COBOL: Primary programming language
  • CICS: Transaction processing
  • VSAM (KSDS with AIX): Data storage
  • JCL: Batch processing
  • RACF: Security
  • ASSEMBLER: System-level programming
    • MVSWAIT: Timer control for batch jobs
    • COBDATFT: Date format conversion utility

Optional Technologies

  • Db2: Relational database management
  • IMS DB: Hierarchical database
  • MQ: Message queuing
  • JCL Utilities: FTP, TXT2PDF, DB2 LOAD/UNLOAD, IMS DB LOAD/UNLOAD, Internal Reader
  • Advanced Data Formats: COMP, COMP-3, Zoned Decimal, Signed, Unsigned
  • Additional Dataset Types: VSAM (ESDS/RRDS), GDG, PDS
  • Record Formats: VB, FBA, and others
  • Complex Copybook Structures: REDEFINES, OCCURS, OCCURS DEPENDING ON

Optional Features

CardDemo includes several optional modules that extend the base functionality:

  1. Credit Card Authorizations with IMS, DB2, and MQ

    • Simulate credit card authorization requests using MQ
    • Retrieve customer data from IMS databases
    • Log transactions in DB2 tables
    • Features include:
      • Authorization request processing
      • Pending authorization summary and details
      • Batch purging of expired authorizations
    • More details: Pending Authorization Extension
  2. Transaction Type Management with DB2

    • Maintain transaction type reference data in DB2 tables
    • Add, update, or delete transaction types from CICS transactions
    • Manage transaction types through batch jobs
    • Demonstrates DB2 integration patterns including cursors and SQL operations
  3. Account Extractions using MQ and VSAM

    • Extract and transmit account data through MQ channels
    • System date inquiry via MQ (CDRD transaction)
    • Account details inquiry via MQ (CDRA transaction)
    • Demonstrates asynchronous processing patterns
  4. Additional JCL Utilities

    • FTP integration
    • Text-to-PDF conversion
    • DB2 and IMS DB load/unload operations
    • Internal reader functionality

Installation

Prerequisites

  • Mainframe environment with CICS, VSAM, and JCL support
  • Optional: DB2, IMS DB, and MQ for extended features
  • File transfer capability between local environment and mainframe

Installation Steps

  1. Prepare Your Environment

    • Clone this repository to your local development environment
    • Ensure you have appropriate access to your mainframe environment
  2. Create Mainframe Datasets

    • Define a High Level Qualifier (HLQ) for your datasets

    • Create the following datasets with the specified formats:

      HLQNameFormatLength
      AWS.M2CARDDEMO.JCLFB80
      AWS.M2CARDDEMO.PROCFB80
      AWS.M2CARDDEMO.CBLFB80
      AWS.M2CARDDEMO.CPYFB80
      AWS.M2CARDDEMO.BMSFB80
      AWS.M2CARDDEMO.ASMFB80
      AWS.M2CARDDEMO.MACLIBFB80
  3. Upload Source Code

    • Upload the application source folders from the repository to your mainframe
    • Use $INDFILE or your preferred file transfer tool
    • Ensure proper transfer modes (binary/text) as appropriate
  4. Upload Sample Data

    • Transfer the sample data from the main/-/data/EBCDIC/ folder to the mainframe

    • Use binary transfer mode to preserve data integrity

    • Create the following datasets:

      Dataset nameDescriptionCopybookFormatLength
      AWS.M2.CARDDEMO.USRSEC.PSUser Security fileCSUSR01YFB80
      AWS.M2.CARDDEMO.ACCTDATA.PSAccount DataCVACT01YFB300
      AWS.M2.CARDDEMO.CARDDATA.PSCard DataCVACT02YFB150
      AWS.M2.CARDDEMO.CUSTDATA.PSCustomer DataCVCUS01YFB500
      AWS.M2.CARDDEMO.CARDXREF.PSCustomer Account Card Cross referenceCVACT03YFB50
      AWS.M2.CARDDEMO.DALYTRAN.PS.INITTransaction database initialization recordCVTRA06YFB350
      AWS.M2.CARDDEMO.DALYTRAN.PSTransaction data for postingCVTRA06YFB350
      AWS.M2.CARDDEMO.TRANSACT.VSAM.KSDSOnline transaction dataCVTRA05YFB350
      AWS.M2.CARDDEMO.DISCGRP.PSDisclosure GroupsCVTRA02YFB50
      AWS.M2.CARDDEMO.TRANCATG.PSTransaction Category TypesCVTRA04YFB60
      AWS.M2.CARDDEMO.TRANTYPE.PSTransaction TypesCVTRA03YFB60
      AWS.M2.CARDDEMO.TCATBALF.PSTransaction Category BalanceCVTRA01YFB50
  5. Initialize the Environment

    • Execute the following JCLs in sequence:

      JobnamePurposeOptional Module
      DUSRSECJSets up user security VSAM file
      CLOSEFILCloses files opened by CICS
      ACCTFILELoads Account database using sample data
      CARDFILELoads Card database with credit card sample data
      CUSTFILECreates customer database
      XREFFILELoads Customer Card account cross reference
      CREADB21Creates CardDemo Db2 database and loads tablesDb2: Transaction Type Mgmt
      TRANFILECopies initial Transaction file to VSAM
      TRANEXTRExtracts TRAN type and category tables from Db2Db2: Transaction Type Mgmt
      DISCGRPCopies initial Disclosure Group file to VSAM
      TCATBALFCopies initial TCATBALF file to VSAM
      TRANCATGCopies initial transaction category file to VSAM
      TRANTYPECopies initial transaction type file to VSAM
      OPENFILMakes files available to CICS
      DEFGDGBDefines GDG Base
      DEFGDGDDefines GDG Bases added for Db2
  6. Compile the Programs

    • Use your standard mainframe compilation procedures
    • Sample JCLs are provided in the samples folder to assist with compilation
  7. Configure CICS Resources

    • Option 1 (Preferred): Use the DFHCSDUP JCL with the CSD file in the CSD folder

    • Option 2: Use CEDA transaction to manually define resources:

      DEFINE LIBRARY(COM2DOLL) GROUP(CARDDEMO) DSNAME01(&HLQ..LOADLIB)
      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)
      
  8. Install and Load Resources

    • Install the resources in your CICS region:

      CEDA INSTALL TRANS(CCLI) GROUP(CARDDEMO)
      CEDA INSTALL FILE(CARDDAT) GROUP(CARDDEMO)
      CECI LOAD PROG(COCRDUP)
      CECI LOAD PROG(COCRDUPC)
      
    • Execute NEWCOPY for mapsets and programs:

      CEMT SET PROG(COCRDUP) NEWCOPY
      CEMT SET PROG(COCRDUPC) NEWCOPY
      

Accessing the Application

  • Online Functions: Start the CardDemo application using the CC00 transaction
    • Admin access: Use userid ADMIN001 with password PASSWORD
    • User access: Use userid USER0001 with password PASSWORD
  • Batch Functions: See the "Running Batch Jobs" section below

Running Batch Jobs

Execute the following JCLs in sequence to run the full batch process:

JobnamePurposeOptional Module
CLOSEFILCloses files opened by CICS
ACCTFILELoads Account database using sample data
CARDFILELoads Card database with credit card sample data
XREFFILELoads Customer Card account cross reference to VSAM
CUSTFILECreates customer database
TRANBKPCreates Transaction database
TRANEXTRExtracts latest Db2 data for Transaction typesDb2: Transaction Type Mgmt
TRANCATGCopies latest transaction category file to VSAM
TRANTYPECopies latest transaction type file to VSAM
DISCGRPCopies initial disclosure Group file to VSAM
TCATBALFCopies initial TCATBALF file to VSAM
DUSRSECJSets up user security VSAM file
POSTTRANCore transaction processing job
INTCALCRun interest calculations
TRANBKPBackup Transaction database
COMBTRANCombine system transactions with daily ones
CREASTMTProduce transaction statement
TRANIDXDefine alternate index on transaction file
OPENFILMakes files available to CICS
WAITSTEPDefines a step to wait job for given time
CBPAUP0JPurge expired authorizationsIMS-DB2-MQ: Pending Authorizations

Application Details

CardDemo is a comprehensive credit card management application built primarily using COBOL. It provides functionality for managing accounts, credit cards, transactions, and bill payments.

User Types

The application supports two user roles:

  • Regular Users: Can perform standard card management functions
  • Admin Users: Can perform administrative functions like user management

User Functions

User Function Flow

The regular user can perform the following functions:

  • View and update account information
  • Manage credit cards
  • View, add, and process transactions
  • Generate transaction reports
  • Make bill payments
  • View pending authorizations (with optional module)

Admin Functions

Admin Function Flow

Admin users can perform the following functions:

  • User management (list, add, update, delete)
  • Transaction type management (with DB2 optional module)

Application Inventory

Online Components

TransactionBMS MapProgramFunctionOptional ModuleNotes
CC00COSGN00COSGN00CSignon Screen
CM00COMEN01COMEN01CMain Menu
CAVWCOACTVWCOACTVWCAccount View
CAUPCOACTUPCOACTUPCAccount Update
CCLICOCRDLICOCRDLICCredit Card List
CCDLCOCRDSLCOCRDSLCCredit Card View
CCUPCOCRDUPCOCRDUPCCredit Card Update
CT00COTRN00COTRN00CTransaction List
CT01COTRN01COTRN01CTransaction View
CT02COTRN02COTRN02CTransaction Add
CR00CORPT00CORPT00CTransaction Reports
CB00COBIL00COBIL00CBill Payment
CPVSCOPAU00COPAUS0CPending Authorization SummaryIMS-DB2-MQ: Pending AuthorizationsRead IMS and VSAM
CPVDCOPAU01COPAUS1CPending Authorization DetailsIMS-DB2-MQ: Pending AuthorizationsUpdate IMS and Insert DB2
CP00COPAUA0CProcess Authorization RequestsIMS-DB2-MQ: Pending AuthorizationsMQ trigger, request and response; Insert and Update to IMS
CA00COADM01COADM01CAdmin MenuDb2: Transaction Type Mgmt
CU00COUSR00COUSR00CList Users
CU01COUSR01COUSR01CAdd User
CU02COUSR02COUSR02CUpdate User
CU03COUSR03COUSR03CDelete User
CTTUCOTRTUPCOTRTUPCTran Type add/editDb2: Transaction Type MgmtUpdate and insert on Db2
CTLICOTRTLICOTRTLICTran Type list/update/deleteDb2: Transaction Type MgmtDemonstrates cursor and delete in Db2
CDRDCODATE01Inquire System Date via MQMQ IntegrationDemonstrates MQ request/response pattern
CDRACOACCT01Inquire account details via MQMQ IntegrationDemonstrates MQ request/response pattern

Batch Components

JobProgramFunctionOptional Module
DUSRSECJIEBGENERInitial Load of User security file
DEFGDGBIDCAMSSetup GDG Bases
DEFGDGDIDCAMSSetup more GDG Bases for Db2
ACCTFILEIDCAMSRefresh Account Master
CARDFILEIDCAMSRefresh Card Master
CUSTFILEIDCAMSRefresh Customer Master
CREADB21DSNTEP4Creates CardDemo Db2 database and loads tablesDb2: Transaction Type Mgmt
TRANEXTRDSNTIAULExtracts latest Db2 data for Transaction typesDb2: Transaction Type Mgmt
DISCGRPIDCAMSLoad Disclosure Group File
TRANFILEIDCAMSLoad Transaction Master file
TRANCATGIDCAMSLoad Transaction category types
TRANTYPEIDCAMSLoad Transaction type file
XREFFILEIDCAMSAccount, Card and Customer cross reference
CLOSEFILIEFBR14Close VSAM files in CICS
TCATBALFIDCAMSRefresh Transaction Category Balance
TRANBKPIDCAMSRefresh Transaction Master
POSTTRANCBTRN02CTransaction processing job
TRANIDXIDCAMSDefine AIX for transaction file
OPENFILIEFBR14Open files in CICS
INTCALCCBACT04CRun interest calculations
COMBTRANSORTCombine transaction files
CREASTMTCBSTM03AProduce transaction statement
TRANREPTCBTRN03CTransaction Report - Submitted from CICS
ESDSRRDSIDCAMSCreate ESDS and RRDS VSAM files
CBPAUP0JCBPAUP0CPurge Expired AuthorizationsIMS-DB2-MQ: Pending Authorizations
MNTTRDB2COBTUPDTMaintain Transaction type tableDb2: Transaction Type Mgmt
WAITSTEPCOBSWAITWait job for given time

Application Screens

Signon Screen

Signon Screen

Main Menu

Note: Option 11 (Pending Authorizations) is only available with the optional Credit Card Authorizations feature. Please refer to the authorization documentation for details.

Admin Menu

Admin Menu

Note: Options 5 and 6 will be enabled only if you install the Transaction Type Management with DB2 optional feature (transactions CTTU and CTLI).

Technical Highlights

ComponentDomain FeaturesTechnical Features
Base ApplicationCustomer
Account
Card
Transaction
Bill Payment
Statement/Report
COBOL
CICS
JCL (Batch)
VSAM (KSDS with AIX)
Optional FeaturesAuthorization
Fraud
Transaction Type (Extension)
DB2
MQ
IMS DB
JCL Utilities
Complex data formats
Various dataset types
Advanced copybook structures

Support

For questions, issues, or improvement requests, please raise an issue in the repository with detailed information about your concern. The maintainers will respond according to availability.

Roadmap

The following features are planned for upcoming releases:

  1. Additional Database Syntax Usage Scenarios

    • DB2 Rewards: Calculate rewards for transactions based on transaction types, categories, and rules
      • Will include stored procedures, functions, and dynamic SQL
    • Hierarchical database: IMS DC implementation
  2. Integration Enhancements

    • FTP and SFTP integration
    • Web Service connectivity
    • Exposure of transactions for distributed application integration

Contributing

We welcome contributions and enhancements to this codebase from the mainframe community. To contribute:

  1. Fork the repository
  2. Create your feature branch
  3. Implement your changes with appropriate tests
  4. Submit a pull request with a clear description of the changes

Feel free to raise issues, create code, and submit merge requests for enhancements to help build this application as a resource for programmers wanting to understand and modernize their mainframes.

License

This project is intended to be a community resource and is released under the Apache 2.0 license.

Project Status

The CardDemo application has been enhanced with optional features that extend its functionality:

  • Credit Card Authorizations with IMS, DB2, and MQ
  • Transaction Type Management with DB2
  • Account Extractions using MQ and VSAM
  • Additional JCL Utilities
  • Enhanced Data and Copybook Features

These optional features make CardDemo an even more useful resource for customers looking to modernize their mainframe applications. With modules for DB2, MQ, IMS DB, JCL utilities, and more data formats now available, customers can leverage CardDemo to test a wider array of mainframe migration, refactoring, replatforming, and augmentation scenarios.

Last updated: April 2025

Contributors

snjarao

14 commits

arunkse

11 commits

kshiabhi

3 commits

vikas020487

1 commits

aws-samples/aws-mainframe-modernization-carddemo

A comprehensive COBOL mainframe credit card management application designed to showcase AWS mainframe modernization technologies and migration patterns.

272

stars

32

commits

COBOL

primary language

Oct 16, 2025

updated

aws.amazon.com/transform/mainframe/
aws-carddemo
aws-mainframe-modernization
aws-transform
mainframe
modernization
open-source

README

CardDemo - Mainframe Credit Card Management Application

Version License

Executive Summary

CardDemo is a comprehensive mainframe application that simulates a credit card management system. Designed specifically to showcase AWS and partner technologies for mainframe migration and modernization scenarios, it provides a realistic environment for testing various modernization approaches including discovery, migration, performance testing, service enablement, and more.

Table of Contents

Description

CardDemo is a mainframe application designed to test and showcase AWS and partner technology for mainframe migration and modernization use-cases. It provides a realistic environment for:

  • Application discovery and analysis
  • Migration assessment and planning
  • Modernization strategy development
  • Performance testing
  • System augmentation
  • Service enablement and extraction
  • Test creation and automation

The application intentionally incorporates various coding styles and patterns to exercise analysis, transformation, and migration tooling across different mainframe programming paradigms.

Technologies

Core Technologies

  • COBOL: Primary programming language
  • CICS: Transaction processing
  • VSAM (KSDS with AIX): Data storage
  • JCL: Batch processing
  • RACF: Security
  • ASSEMBLER: System-level programming
    • MVSWAIT: Timer control for batch jobs
    • COBDATFT: Date format conversion utility

Optional Technologies

  • Db2: Relational database management
  • IMS DB: Hierarchical database
  • MQ: Message queuing
  • JCL Utilities: FTP, TXT2PDF, DB2 LOAD/UNLOAD, IMS DB LOAD/UNLOAD, Internal Reader
  • Advanced Data Formats: COMP, COMP-3, Zoned Decimal, Signed, Unsigned
  • Additional Dataset Types: VSAM (ESDS/RRDS), GDG, PDS
  • Record Formats: VB, FBA, and others
  • Complex Copybook Structures: REDEFINES, OCCURS, OCCURS DEPENDING ON

Optional Features

CardDemo includes several optional modules that extend the base functionality:

  1. Credit Card Authorizations with IMS, DB2, and MQ

    • Simulate credit card authorization requests using MQ
    • Retrieve customer data from IMS databases
    • Log transactions in DB2 tables
    • Features include:
      • Authorization request processing
      • Pending authorization summary and details
      • Batch purging of expired authorizations
    • More details: Pending Authorization Extension
  2. Transaction Type Management with DB2

    • Maintain transaction type reference data in DB2 tables
    • Add, update, or delete transaction types from CICS transactions
    • Manage transaction types through batch jobs
    • Demonstrates DB2 integration patterns including cursors and SQL operations
  3. Account Extractions using MQ and VSAM

    • Extract and transmit account data through MQ channels
    • System date inquiry via MQ (CDRD transaction)
    • Account details inquiry via MQ (CDRA transaction)
    • Demonstrates asynchronous processing patterns
  4. Additional JCL Utilities

    • FTP integration
    • Text-to-PDF conversion
    • DB2 and IMS DB load/unload operations
    • Internal reader functionality

Installation

Prerequisites

  • Mainframe environment with CICS, VSAM, and JCL support
  • Optional: DB2, IMS DB, and MQ for extended features
  • File transfer capability between local environment and mainframe

Installation Steps

  1. Prepare Your Environment

    • Clone this repository to your local development environment
    • Ensure you have appropriate access to your mainframe environment
  2. Create Mainframe Datasets

    • Define a High Level Qualifier (HLQ) for your datasets

    • Create the following datasets with the specified formats:

      HLQNameFormatLength
      AWS.M2CARDDEMO.JCLFB80
      AWS.M2CARDDEMO.PROCFB80
      AWS.M2CARDDEMO.CBLFB80
      AWS.M2CARDDEMO.CPYFB80
      AWS.M2CARDDEMO.BMSFB80
      AWS.M2CARDDEMO.ASMFB80
      AWS.M2CARDDEMO.MACLIBFB80
  3. Upload Source Code

    • Upload the application source folders from the repository to your mainframe
    • Use $INDFILE or your preferred file transfer tool
    • Ensure proper transfer modes (binary/text) as appropriate
  4. Upload Sample Data

    • Transfer the sample data from the main/-/data/EBCDIC/ folder to the mainframe

    • Use binary transfer mode to preserve data integrity

    • Create the following datasets:

      Dataset nameDescriptionCopybookFormatLength
      AWS.M2.CARDDEMO.USRSEC.PSUser Security fileCSUSR01YFB80
      AWS.M2.CARDDEMO.ACCTDATA.PSAccount DataCVACT01YFB300
      AWS.M2.CARDDEMO.CARDDATA.PSCard DataCVACT02YFB150
      AWS.M2.CARDDEMO.CUSTDATA.PSCustomer DataCVCUS01YFB500
      AWS.M2.CARDDEMO.CARDXREF.PSCustomer Account Card Cross referenceCVACT03YFB50
      AWS.M2.CARDDEMO.DALYTRAN.PS.INITTransaction database initialization recordCVTRA06YFB350
      AWS.M2.CARDDEMO.DALYTRAN.PSTransaction data for postingCVTRA06YFB350
      AWS.M2.CARDDEMO.TRANSACT.VSAM.KSDSOnline transaction dataCVTRA05YFB350
      AWS.M2.CARDDEMO.DISCGRP.PSDisclosure GroupsCVTRA02YFB50
      AWS.M2.CARDDEMO.TRANCATG.PSTransaction Category TypesCVTRA04YFB60
      AWS.M2.CARDDEMO.TRANTYPE.PSTransaction TypesCVTRA03YFB60
      AWS.M2.CARDDEMO.TCATBALF.PSTransaction Category BalanceCVTRA01YFB50
  5. Initialize the Environment

    • Execute the following JCLs in sequence:

      JobnamePurposeOptional Module
      DUSRSECJSets up user security VSAM file
      CLOSEFILCloses files opened by CICS
      ACCTFILELoads Account database using sample data
      CARDFILELoads Card database with credit card sample data
      CUSTFILECreates customer database
      XREFFILELoads Customer Card account cross reference
      CREADB21Creates CardDemo Db2 database and loads tablesDb2: Transaction Type Mgmt
      TRANFILECopies initial Transaction file to VSAM
      TRANEXTRExtracts TRAN type and category tables from Db2Db2: Transaction Type Mgmt
      DISCGRPCopies initial Disclosure Group file to VSAM
      TCATBALFCopies initial TCATBALF file to VSAM
      TRANCATGCopies initial transaction category file to VSAM
      TRANTYPECopies initial transaction type file to VSAM
      OPENFILMakes files available to CICS
      DEFGDGBDefines GDG Base
      DEFGDGDDefines GDG Bases added for Db2
  6. Compile the Programs

    • Use your standard mainframe compilation procedures
    • Sample JCLs are provided in the samples folder to assist with compilation
  7. Configure CICS Resources

    • Option 1 (Preferred): Use the DFHCSDUP JCL with the CSD file in the CSD folder

    • Option 2: Use CEDA transaction to manually define resources:

      DEFINE LIBRARY(COM2DOLL) GROUP(CARDDEMO) DSNAME01(&HLQ..LOADLIB)
      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)
      
  8. Install and Load Resources

    • Install the resources in your CICS region:

      CEDA INSTALL TRANS(CCLI) GROUP(CARDDEMO)
      CEDA INSTALL FILE(CARDDAT) GROUP(CARDDEMO)
      CECI LOAD PROG(COCRDUP)
      CECI LOAD PROG(COCRDUPC)
      
    • Execute NEWCOPY for mapsets and programs:

      CEMT SET PROG(COCRDUP) NEWCOPY
      CEMT SET PROG(COCRDUPC) NEWCOPY
      

Accessing the Application

  • Online Functions: Start the CardDemo application using the CC00 transaction
    • Admin access: Use userid ADMIN001 with password PASSWORD
    • User access: Use userid USER0001 with password PASSWORD
  • Batch Functions: See the "Running Batch Jobs" section below

Running Batch Jobs

Execute the following JCLs in sequence to run the full batch process:

JobnamePurposeOptional Module
CLOSEFILCloses files opened by CICS
ACCTFILELoads Account database using sample data
CARDFILELoads Card database with credit card sample data
XREFFILELoads Customer Card account cross reference to VSAM
CUSTFILECreates customer database
TRANBKPCreates Transaction database
TRANEXTRExtracts latest Db2 data for Transaction typesDb2: Transaction Type Mgmt
TRANCATGCopies latest transaction category file to VSAM
TRANTYPECopies latest transaction type file to VSAM
DISCGRPCopies initial disclosure Group file to VSAM
TCATBALFCopies initial TCATBALF file to VSAM
DUSRSECJSets up user security VSAM file
POSTTRANCore transaction processing job
INTCALCRun interest calculations
TRANBKPBackup Transaction database
COMBTRANCombine system transactions with daily ones
CREASTMTProduce transaction statement
TRANIDXDefine alternate index on transaction file
OPENFILMakes files available to CICS
WAITSTEPDefines a step to wait job for given time
CBPAUP0JPurge expired authorizationsIMS-DB2-MQ: Pending Authorizations

Application Details

CardDemo is a comprehensive credit card management application built primarily using COBOL. It provides functionality for managing accounts, credit cards, transactions, and bill payments.

User Types

The application supports two user roles:

  • Regular Users: Can perform standard card management functions
  • Admin Users: Can perform administrative functions like user management

User Functions

User Function Flow

The regular user can perform the following functions:

  • View and update account information
  • Manage credit cards
  • View, add, and process transactions
  • Generate transaction reports
  • Make bill payments
  • View pending authorizations (with optional module)

Admin Functions

Admin Function Flow

Admin users can perform the following functions:

  • User management (list, add, update, delete)
  • Transaction type management (with DB2 optional module)

Application Inventory

Online Components

TransactionBMS MapProgramFunctionOptional ModuleNotes
CC00COSGN00COSGN00CSignon Screen
CM00COMEN01COMEN01CMain Menu
CAVWCOACTVWCOACTVWCAccount View
CAUPCOACTUPCOACTUPCAccount Update
CCLICOCRDLICOCRDLICCredit Card List
CCDLCOCRDSLCOCRDSLCCredit Card View
CCUPCOCRDUPCOCRDUPCCredit Card Update
CT00COTRN00COTRN00CTransaction List
CT01COTRN01COTRN01CTransaction View
CT02COTRN02COTRN02CTransaction Add
CR00CORPT00CORPT00CTransaction Reports
CB00COBIL00COBIL00CBill Payment
CPVSCOPAU00COPAUS0CPending Authorization SummaryIMS-DB2-MQ: Pending AuthorizationsRead IMS and VSAM
CPVDCOPAU01COPAUS1CPending Authorization DetailsIMS-DB2-MQ: Pending AuthorizationsUpdate IMS and Insert DB2
CP00COPAUA0CProcess Authorization RequestsIMS-DB2-MQ: Pending AuthorizationsMQ trigger, request and response; Insert and Update to IMS
CA00COADM01COADM01CAdmin MenuDb2: Transaction Type Mgmt
CU00COUSR00COUSR00CList Users
CU01COUSR01COUSR01CAdd User
CU02COUSR02COUSR02CUpdate User
CU03COUSR03COUSR03CDelete User
CTTUCOTRTUPCOTRTUPCTran Type add/editDb2: Transaction Type MgmtUpdate and insert on Db2
CTLICOTRTLICOTRTLICTran Type list/update/deleteDb2: Transaction Type MgmtDemonstrates cursor and delete in Db2
CDRDCODATE01Inquire System Date via MQMQ IntegrationDemonstrates MQ request/response pattern
CDRACOACCT01Inquire account details via MQMQ IntegrationDemonstrates MQ request/response pattern

Batch Components

JobProgramFunctionOptional Module
DUSRSECJIEBGENERInitial Load of User security file
DEFGDGBIDCAMSSetup GDG Bases
DEFGDGDIDCAMSSetup more GDG Bases for Db2
ACCTFILEIDCAMSRefresh Account Master
CARDFILEIDCAMSRefresh Card Master
CUSTFILEIDCAMSRefresh Customer Master
CREADB21DSNTEP4Creates CardDemo Db2 database and loads tablesDb2: Transaction Type Mgmt
TRANEXTRDSNTIAULExtracts latest Db2 data for Transaction typesDb2: Transaction Type Mgmt
DISCGRPIDCAMSLoad Disclosure Group File
TRANFILEIDCAMSLoad Transaction Master file
TRANCATGIDCAMSLoad Transaction category types
TRANTYPEIDCAMSLoad Transaction type file
XREFFILEIDCAMSAccount, Card and Customer cross reference
CLOSEFILIEFBR14Close VSAM files in CICS
TCATBALFIDCAMSRefresh Transaction Category Balance
TRANBKPIDCAMSRefresh Transaction Master
POSTTRANCBTRN02CTransaction processing job
TRANIDXIDCAMSDefine AIX for transaction file
OPENFILIEFBR14Open files in CICS
INTCALCCBACT04CRun interest calculations
COMBTRANSORTCombine transaction files
CREASTMTCBSTM03AProduce transaction statement
TRANREPTCBTRN03CTransaction Report - Submitted from CICS
ESDSRRDSIDCAMSCreate ESDS and RRDS VSAM files
CBPAUP0JCBPAUP0CPurge Expired AuthorizationsIMS-DB2-MQ: Pending Authorizations
MNTTRDB2COBTUPDTMaintain Transaction type tableDb2: Transaction Type Mgmt
WAITSTEPCOBSWAITWait job for given time

Application Screens

Signon Screen

Signon Screen

Main Menu

Note: Option 11 (Pending Authorizations) is only available with the optional Credit Card Authorizations feature. Please refer to the authorization documentation for details.

Admin Menu

Admin Menu

Note: Options 5 and 6 will be enabled only if you install the Transaction Type Management with DB2 optional feature (transactions CTTU and CTLI).

Technical Highlights

ComponentDomain FeaturesTechnical Features
Base ApplicationCustomer
Account
Card
Transaction
Bill Payment
Statement/Report
COBOL
CICS
JCL (Batch)
VSAM (KSDS with AIX)
Optional FeaturesAuthorization
Fraud
Transaction Type (Extension)
DB2
MQ
IMS DB
JCL Utilities
Complex data formats
Various dataset types
Advanced copybook structures

Support

For questions, issues, or improvement requests, please raise an issue in the repository with detailed information about your concern. The maintainers will respond according to availability.

Roadmap

The following features are planned for upcoming releases:

  1. Additional Database Syntax Usage Scenarios

    • DB2 Rewards: Calculate rewards for transactions based on transaction types, categories, and rules
      • Will include stored procedures, functions, and dynamic SQL
    • Hierarchical database: IMS DC implementation
  2. Integration Enhancements

    • FTP and SFTP integration
    • Web Service connectivity
    • Exposure of transactions for distributed application integration

Contributing

We welcome contributions and enhancements to this codebase from the mainframe community. To contribute:

  1. Fork the repository
  2. Create your feature branch
  3. Implement your changes with appropriate tests
  4. Submit a pull request with a clear description of the changes

Feel free to raise issues, create code, and submit merge requests for enhancements to help build this application as a resource for programmers wanting to understand and modernize their mainframes.

License

This project is intended to be a community resource and is released under the Apache 2.0 license.

Project Status

The CardDemo application has been enhanced with optional features that extend its functionality:

  • Credit Card Authorizations with IMS, DB2, and MQ
  • Transaction Type Management with DB2
  • Account Extractions using MQ and VSAM
  • Additional JCL Utilities
  • Enhanced Data and Copybook Features

These optional features make CardDemo an even more useful resource for customers looking to modernize their mainframe applications. With modules for DB2, MQ, IMS DB, JCL utilities, and more data formats now available, customers can leverage CardDemo to test a wider array of mainframe migration, refactoring, replatforming, and augmentation scenarios.

Last updated: April 2025

Contributors

snjarao

14 commits

arunkse

11 commits

kshiabhi

3 commits

vikas020487

1 commits

Languages

COBOL

84.0%

PostScript

6.6%

JCL

6.4%

Csound Document

1.5%