AWS Mainframe Modernization · Static Analysis

CardDemo Application Report

Comprehensive analysis of the AWS CardDemo mainframe credit card management system — 44 COBOL programs, 30K+ lines of code, spanning CICS online transactions and JCL batch processing.

44
COBOL Programs
30,175
Lines of Code
62
Copybooks
24
CICS Transactions
11+
VSAM Files
46
JCL Jobs

Application Summary

A full credit card lifecycle simulator — account management, card operations, transaction processing, bill payments, reporting, and user administration.

Core Capabilities

  • User authentication & role-based access (admin / regular)
  • Account view, update with extensive field validation
  • Credit card CRUD with paginated browse
  • Online transaction add with cross-reference validation
  • Bill payment processing with balance updates
  • Transaction reporting & statement generation
  • User administration (list, add, update, delete)
  • Batch daily posting, interest calculation, statements

Technology Stack

COBOL-85 CICS TS 5.3+ VSAM KSDS JCL BMS 3270 RACF Assembler

Optional Extensions

DB2 IMS DB MQ Series

Application Modules

  • Base App — 31 programs, 17 BMS maps, 38 JCL jobs
  • Auth IMS-DB2-MQ — 8 programs, MQ-driven authorization
  • Tran Type DB2 — 3 programs, DB2 reference data
  • VSAM-MQ — 2 programs, async account inquiry

System Architecture

Multi-tier mainframe system with CICS online processing, JCL batch subsystem, and VSAM data store with optional DB2/IMS/MQ integrations.

CICS Online Region

  • 17 base programs with pseudo-conversational model
  • 20 base transactions (CC00, CM00, CA00, CAVW, etc.)
  • 8 VSAM files defined in CSD + 2 AIX paths
  • 17 BMS mapsets for 3270 terminal screens
  • TD Queue (JOBS) for batch job submission from CICS

Batch Processing

  • CA7 trigger chain: CLOSEFIL → CBPAUP0J → POSTTRAN → OPENFIL
  • Control-M: Daily backup, Weekly DB refresh, Monthly interest
  • Core jobs: POSTTRAN, INTCALC, CREASTMT, TRANREPT
  • GDG management for transaction file generations
  • SORT utility for file merging (COMBTRAN)

Code Metrics

Size distribution across 44 COBOL programs — from the 41-line COBSWAIT utility to the 4,236-line COACTUPC account update behemoth.

ProgramLOCCategoryFunctionSize
ModuleBase ApplicationDescriptionLargest program — extensive field validation for account updates using CSUTLDWY/CSUTLDPY date utilities. Validates account status, credit limits, dates, ZIP codes. Uses 18+ COPY CSSETATY REPLACING instances.DependenciesReads/updates ACCTDAT, reads CUSTDAT and CCXREF. Uses CSLKPCDY lookup tables (1,318 lines).
ModuleTransaction Type DB2 (Optional)DescriptionDB2 cursor-based paginated listing of TRNTYPE table. Combines list display, pagination, and delete operations in a single program.DependenciesDB2 TRNTYPE table. Uses DCLTRTYP DCLGEN copybook.
ModuleTransaction Type DB2 (Optional)DescriptionINSERT new or UPDATE existing transaction types in DB2. Complex add/edit form with extensive validation and multiple COPY REPLACING instances.DependenciesDB2 TRNTYPE and TRNTYCAT tables.
ModuleBase ApplicationDescriptionValidates card number, embossed name, expiration date, active status. 148 IF statements with 21 GO TOs create deeply nested validation logic.DependenciesUpdates CARDDAT. Date validation via CSUTLDWY/CSUTLDPY copybooks.
ModuleBase ApplicationDescriptionPaginated browse of CARDDAT via STARTBR/READNEXT. Supports forward/backward paging (PF7/PF8). Selection transfers to detail view (COCRDSLC) or update (COCRDUPC) via XCTL.DependenciesReads CARDDAT. XCTLs to COCRDSLC and COCRDUPC.
ModuleAuthorization IMS-DB2-MQ (Optional)DescriptionDisplays summary of pending authorization requests. Paginated browse with selection to detail view (COPAUS1C).DependenciesIMS DB for authorization data. XCTLs to COPAUS1C.
ModuleAuthorization IMS-DB2-MQ (Optional)DescriptionMQ-triggered program: receives authorization request from queue, validates card via CCXREF, checks IMS pending auth database, logs fraud check to DB2 AUTHFRDS, sends approval/denial via MQ reply queue.DependenciesMQ queues, IMS DB, DB2 AUTHFRDS, VSAM CCXREF/ACCTDAT/CARDDAT/CUSTDAT.
ModuleBase ApplicationDescriptionRead-only account display. Reads ACCTDAT by account ID, CARDDAT via AIX path for associated cards, CUSTDAT via CCXREF cross-reference.DependenciesReads ACCTDAT, CARDDAT (AIX), CUSTDAT, CCXREF. No update operations.
ModuleBase ApplicationDescriptionStatement generation orchestrator. Reads XREFDAT, CUSTDAT, ACCTDAT. Calls CBSTM03B sub-program for page formatting and output. Generates customer-facing statements with transaction details.DependenciesTightly coupled with CBSTM03B — must migrate together.
ModuleBase ApplicationDescriptionValidates card number against CCXREF cross-reference, verifies account exists in ACCTDAT and is active, generates transaction ID with timestamp, writes new record to TRANSACT.DependenciesReads CCXREF, ACCTDAT. Writes TRANSACT.
ModuleBase ApplicationDescriptionCore daily transaction posting engine. Reads DALYTRAN sequential file, validates card via XREFDAT, looks up account in ACCTDAT, updates balance, updates TCATBALF category balance, writes to TRANSACT master. Rejected transactions logged separately.DependenciesReads DALYTRAN, XREFDAT, ACCTDAT. Updates ACCTDAT, TCATBALF. Writes TRANSACT.
ModuleBase ApplicationDescriptionInterest calculation for all accounts. Accepts date parameter via LINKAGE SECTION. Reads TCATBALF balances, looks up DISCGRP rates, calculates balance × rate / 100 / 365 × days, creates interest transaction in TRANSACT, updates ACCTDAT and TCATBALF.DependenciesReads XREFDAT, TCATBALF, DISCGRP. Updates ACCTDAT, TCATBALF. Writes TRANSACT.

File Type Distribution

  • COBOL (.cbl/.CBL) — 44 files, ~30,175 LOC
  • Copybooks (.cpy/.CPY) — 62 files, ~8,400+ LOC
  • BMS Maps (.bms) — 21 files, ~4,472 LOC
  • JCL (.jcl/.JCL) — 46 files, ~2,429 LOC
  • Assembler (.asm) — 2 files, 114 LOC
  • DDL/DCL/IMS/CSD — 20 files

Summary Statistics

  • Average program size: 686 lines
  • Median program size: ~520 lines
  • Largest: COACTUPC (4,236 lines)
  • Smallest: COBSWAIT (41 lines)
  • Total all source: ~45,000+ lines
  • 200+ total source files across all modules

Security Vulnerabilities

Critical security findings including plaintext passwords, unencrypted PCI/PII data, and disabled RACF security controls.

IDFindingSeverityLocation
DescriptionUser passwords stored as plaintext in USRSEC VSAM file. Comparison done directly: IF SEC-USR-PWD = WS-USER-PWD (line 223). No hashing, encryption, or salting applied.ImpactAny user with read access to the VSAM file can see all passwords in clear text.RecommendationImplement password hashing before storage; use one-way hash comparison. Migrate existing passwords via forced reset.
DescriptionAdmin (ADMIN001/PASSWORD) and user (USER0001/PASSWORD) credentials documented in public GitHub repository. Same trivial password for both roles.ImpactAnyone with repository access knows valid credentials for both admin and regular user accounts.RecommendationRemove credentials from documentation. Implement first-login password change requirement.
DescriptionAll TRANSACTION definitions in CARDDEMO.CSD contain RESSEC(NO) CMDSEC(NO), explicitly disabling transaction-level resource security and command security.ImpactNo external security manager (RACF) enforcement at the transaction level. Any authenticated user can execute any transaction.RecommendationUpdate CSD definitions: set RESSEC(YES) and CMDSEC(YES) on all transactions. Define RACF profiles for each transaction and resource.
DescriptionCredit card numbers (CARD-NUM), CVV codes (CARD-CVV-CD), and Social Security numbers (CUST-SSN) stored without any encryption in VSAM files.ImpactNon-compliant with PCI DSS requirements. Direct PII exposure risk if files are accessed or exfiltrated.RecommendationImplement field-level encryption for sensitive data using z/OS ICSF services or application-level encryption routines. Mask card numbers in display (show only last 4 digits).
DescriptionAll FILE definitions in CARDDEMO.CSD contain JOURNAL(NO) and RECOVERY(NONE). No CICS journaling or forward recovery configured for any data file.ImpactNo audit trail for data changes. No recovery capability from data corruption or system failure.RecommendationEnable CICS journaling: set JOURNAL(YES) and RECOVERY(BACKOUTONLY) on critical files (ACCTDAT, CARDDAT, TRANSACT, USRSEC). Requires journal log stream setup.
DescriptionThe PROCESS-ENTER-KEY paragraph in COSGN00C has no mechanism to track or limit failed login attempts. Users can retry indefinitely.ImpactSusceptible to brute-force password attacks. No detection of repeated unauthorized access attempts.RecommendationImplement a failed attempt counter in the USRSEC record. Lock the account after N consecutive failures. Add a timestamp-based unlock or admin reset.
DescriptionAll online programs use EXEC CICS RETURN with COMMAREA but implement no explicit session timeout. Sessions persist as long as the CICS region allows.ImpactUnattended terminals remain authenticated indefinitely, creating a physical security risk.RecommendationImplement a timestamp in COMMAREA. Validate session age on each RETURN and force re-authentication after a configurable idle period.
DescriptionNo program in the application logs user actions such as login attempts, data modifications, admin operations, or report generation.ImpactCannot track who performed what operations and when. No forensic capability for security incidents or compliance audits.RecommendationImplement CICS journaling or write audit records to a dedicated VSAM or DB2 audit table for all sensitive operations.
DescriptionUser role (admin vs regular) is stored in CARDDEMO-COMMAREA and passed between programs. The flag is set once at sign-on and trusted by all downstream programs.ImpactIf COMMAREA contents are exposed or manipulated, a regular user could potentially gain admin access.RecommendationRe-validate user type from the USRSEC file on sensitive operations (user management, report submission) rather than trusting the COMMAREA flag alone.

Sensitive Data Exposure

Data ElementCopybookProtectionRisk
FieldSEC-USR-PWD PIC X(08) in USRSEC VSAM file.IssuePasswords stored and compared as plaintext. No hashing or encryption.RemediationImplement one-way hash (e.g., SHA-256) before storage. Force password reset for all existing users.
FieldCARD-NUM PIC X(16) — full 16-digit card number stored in clear.IssuePCI DSS requires encryption of stored cardholder data. Card numbers displayed in full on screens.RemediationEncrypt at rest using z/OS ICSF. Mask display to show only last 4 digits.
FieldCARD-CVV-CD PIC X(04) — CVV security code stored in clear.IssuePCI DSS prohibits storage of CVV after authorization. This is a direct compliance violation.RemediationRemove CVV from persistent storage entirely. Only use in-memory during authorization flow.
FieldCUST-SSN PIC X(09) — Social Security Number stored unencrypted.IssuePII exposure risk. Regulatory non-compliance (GLBA, state privacy laws).RemediationApply field-level encryption. Mask display to show only last 4 digits (XXX-XX-1234).
FieldGovernment-issued identification number stored in clear in CUSTDAT VSAM file.IssuePII exposure. Could be driver's license, passport, or other government ID.RemediationApply field-level encryption. Restrict display access to authorized roles only.

Complexity Analysis

Conditional branch counts, GO TO usage, and structural complexity across the codebase. 26% of base programs use GO TO statements.

ProgramLOCIFEVALUATEPERFORMGO TOComplexity
FunctionAccount Update — largest program in the entire application.Key Concerns51 GO TO statements severely impact readability. 18+ COPY CSSETATY REPLACING instances (lines 3208–3310) inflate effective code size. Deeply nested validation logic for account fields.RecommendationDecompose into validation sub-program, display logic, and update logic — target <1,000 lines each.
FunctionCredit Card Update — complex card update with deeply nested validation logic.Key Concerns148 IF statements with 21 GO TOs make control flow difficult to follow. Date editing via CSUTLDWY/CSUTLDPY copybooks adds hidden complexity.RecommendationExtract validation into shared paragraphs. Replace GO TO with structured PERFORM THRU patterns.
FunctionCredit Card List — paginated browse of CARDDAT via STARTBR/READNEXT.Key Concerns122 IF statements with 16 GO TOs complicate the browse/pagination logic. Supports forward/backward paging (PF7/PF8) with selection transfer via XCTL.RecommendationSeparate browse logic from selection/transfer logic. Refactor GO TOs to PERFORM THRU.
FunctionCore Batch Transaction Posting — the daily posting engine.Key Concerns93 IF statements with 62 PERFORMs. For each transaction: validates card via XREFDAT, looks up account in ACCTDAT, updates balance, updates TCATBALF, writes to TRANSACT. Rejected transactions logged separately.RecommendationWell-structured (no GO TOs) but high branch count. Consider extracting validation and posting into separate paragraphs.
FunctionInterest Calculation — computes interest for all accounts.Key Concerns86 IF statements. Calculates: balance × rate / 100 / 365 × days. Reads TCATBALF, looks up DISCGRP rates, creates interest transactions, updates ACCTDAT and TCATBALF.RecommendationWell-structured (no GO TOs). Consider extracting rate lookup and interest computation into separate paragraphs for testability.
FunctionTransaction Report Generation — reads TRANSACT, joins with XREFDAT, TRANTYPE, TRANCATG.Key Concerns75 IF statements with 73 PERFORMs. High branch count from multi-file joins and formatting logic.RecommendationWell-structured. Consider separating data retrieval from report formatting.
FunctionCredit Card Detail View — reads CARDDAT by card number, joins with CUSTDAT.Key Concerns9 GO TO statements add moderate complexity. Display-only with option to edit (PF5 → COCRDUPC via XCTL).RecommendationRefactor GO TOs to PERFORM THRU. Relatively manageable size.
FunctionAccount View — reads ACCTDAT, CARDDAT via AIX, CUSTDAT via CCXREF. Display-only.Key Concerns9 GO TO statements. Multi-file reads add branching for error handling on each file access.RecommendationRefactor GO TOs. Consider extracting cross-reference lookup into a shared utility.
FunctionStatement Generation — orchestrates reading XREFDAT, CUSTDAT, ACCTDAT. Calls CBSTM03B for page formatting.Key Concerns15 GO TO statements make batch flow harder to trace. Tightly coupled with CBSTM03B sub-program.RecommendationMust migrate together with CBSTM03B. Refactor GO TOs to structured flow.
FunctionOnline Transaction Add — validates card via CCXREF, checks account is active, generates transaction ID with timestamp.Key Concerns26 EVALUATE blocks handle multiple input scenarios. Well-structured with no GO TOs.RecommendationGood structure. Low priority for refactoring.

GO TO Hotspots

8 of 31 base programs (26%) use GO TO — a legacy control flow pattern that severely impacts readability and testability.

  • COACTUPC: 51 GO TOs — severely impacts readability
  • COCRDUPC: 21 GO TOs — difficult control flow
  • COCRDLIC: 16 GO TOs — complicates browse logic
  • CBSTM03A: 15 GO TOs — batch flow harder to trace
  • CBSTM03B: 13 GO TOs — sub-program flow unclear
  • COACTVWC / COCRDSLC: 9 each — moderate impact

COPY REPLACING Inflation

The COPY CSSETATY REPLACING pattern inflates effective code size well beyond visible source lines.

  • COACTUPC: 18+ COPY REPLACING instances (lines 3208-3310) for field attribute management
  • COTRTUPC: Multiple COPY REPLACING instances for form validation
  • Preprocessed code differs significantly from source — complicates debugging
  • Repetitive patterns that could be simplified into iterative paragraphs

Technical Debt & Remediation

23 identified debt items across 4 severity levels. No AWS-managed transformations apply — this COBOL/CICS system requires AWS Mainframe Modernization (M2) evaluation.

5
Critical
6
High
8
Medium
4
Low
IDRemediation ItemPriorityAddresses
ActionModify COSGN00C and USRSEC file handling to store hashed passwords instead of plaintext.ApproachUse CICS LINK to a hashing utility program; migrate existing passwords via batch conversion job.DependenciesRequires hashing utility (z/OS ICSF or custom routine).
ActionRemove hardcoded credentials from README.md. Implement first-login password change enforcement.RiskPublic repository exposes admin/user credentials — immediate exploitation risk.
ActionUpdate CSD definitions: set RESSEC(YES) and CMDSEC(YES) on all 24 transactions.DependenciesRequires RACF profile definitions for all transactions and resources. Coordinate with security team.
ActionImplement field-level encryption for CARD-NUM (16 bytes), CARD-CVV-CD (4 bytes), CUST-SSN (9 bytes) in CARDDAT and CUSTDAT.ApproachUse z/OS ICSF services or application-level encryption routines. Requires key management infrastructure.
ActionUpdate CSD: set JOURNAL(YES) and RECOVERY(BACKOUTONLY) on critical VSAM files (ACCTDAT, CARDDAT, TRANSACT, USRSEC).DependenciesRequires journal log stream setup and sufficient DASD allocation.
ActionSplit 4,236-line program into: validation sub-program, display logic, update logic, date validation module.TargetEach resulting program under 1,000 lines. Currently has 51 GO TOs, 148 IF statements, 18+ COPY REPLACING instances.
ActionReplace GO TO with structured PERFORM THRU patterns across 8 programs (26% of base programs).Priority OrderCOACTUPC (51 GO TOs) → COCRDUPC (21) → COCRDLIC (16) → remaining 5 programs.
ActionCreate a single validation paragraph that iterates through field list instead of repetitive CSSETATY COPY REPLACING.AffectedCOACTUPC (18+ instances), COTRTUPC. Reduces effective code size significantly.
ActionVerify UNUSED1Y.cpy is not referenced by any program, then remove from repository.RiskLow — static analysis confirms no COPY UNUSED1Y statements exist.
ActionStandardize on CVCUS01Y.cpy as the single customer record definition. Update CBSTM03A (batch statement generator) to use CVCUS01Y instead of CUSTREC.cpy.RiskMedium — requires regression testing of batch statement generation.
ActionRename all files to lowercase extensions (.cbl, .cpy, .jcl, .bms). Currently mixed: .cbl/.CBL, .cpy/.CPY, .jcl/.JCL.RiskLow — update build scripts and JCL references accordingly.
ActionAdd CICS journal writes or dedicated audit VSAM file for key operations: sign-on, account updates, card changes, user management.AddressesNo audit trail currently exists — cannot track who changed what or when.

Modernization Pathways

  • Option A — Replatform: Move COBOL to AWS M2 managed runtime. Minimal code changes, fastest path to reduce mainframe costs
  • Option B — Refactor: Convert COBOL to Java/C#. Modernize VSAM → RDS/Aurora. Replace BMS with web UI
  • Option C — Re-architect: Decompose into microservices (Account, Card, Transaction, User, Auth, Reporting). API-first with Lambda, API Gateway, DynamoDB/RDS, SQS/SNS

Debt by Module

  • Base Application: 3 Critical, 4 High, 5 Medium, 3 Low
  • Auth IMS-DB2-MQ: 1 Critical, 1 High, 2 Medium, 1 Low
  • Tran Type DB2: 0 Critical, 1 High, 1 Medium
  • VSAM-MQ: 1 Critical

Migration Wave Strategy

Dependency-based migration sequencing across 6 waves — from independent utilities to optional modules with external technology dependencies.

Wave 1 — Independent Utilities & Data Layer

Self-contained components with minimal dependencies. Migrate first to establish foundation.
CSUTLDTCCOBSWAITCSUSR01YCVACT01Y-03YCVCUS01YCVTRA01Y-07YVSAM schemas

Wave 2 — Batch Data Load Programs

File load utilities depending only on data copybooks from Wave 1.
CBACT01CCBACT02CCBACT03CCBCUS01C

Wave 3 — Core Batch Processing

Business logic batch programs — transaction posting, interest calculation, reporting, statements.
CBTRN01CCBTRN02CCBACT04CCBTRN03CCBSTM03A/BCBEXPORTCBIMPORT

Wave 4 — Online Authentication & Menus

Entry points — sign-on, main menu, admin menu. Depend on shared copybooks.
COSGN00CCOMEN01CCOADM01C

Wave 5 — Online CRUD Screens

Business function screens — account, card, transaction, bill payment, user management.
COACTVWCCOACTUPCCOCRDLICCOCRDSLCCOCRDUPCCOTRN00C-02CCOBIL00CCORPT00CCOUSR00C-03C

Wave 6 — Optional Modules

Migrate last due to additional DB2, IMS, and MQ technology dependencies.
COTRTLICCOTRTUPCCOBTUPDTCOPAUA0CCOPAUS0C-2CCBPAUP0CCOACCT01CODATE01

Tightly Coupled Components — Must Migrate Together

  • CBSTM03A + CBSTM03B — Statement generation main + sub-program
  • COCRDLIC + COCRDSLC + COCRDUPC — Card management flow
  • COUSR00C + COUSR01C + COUSR02C + COUSR03C — User CRUD suite
  • COTRN00C + COTRN01C + COTRN02C — Transaction management suite
  • COPAUS0C + COPAUS1C + COPAUS2C — Authorization view suite

CICS Transaction Map

All 24 CICS transactions with their programs, BMS maps, and functional descriptions.

Tran IDProgramBMS MapFunction
DescriptionUser authentication entry point. Validates credentials against USRSEC VSAM file. Routes admin users to CA00/COADM01C and regular users to CM00/COMEN01C via XCTL.Key FieldsUser ID (8 chars), Password (8 chars), User Type (admin/regular).
DescriptionMain menu dispatcher for regular users. Routes to 8 functional areas via XCTL based on menu option selection (1–7, 11).Options1: Account View, 2: Account Update, 3: Card List, 4: Bill Payment, 5: Transaction List, 6: Transaction Add, 7: Reports, 11: Pending Auth (optional).
DescriptionRead-only account display. Reads ACCTDAT by account ID, joins CARDDAT via AIX path and CUSTDAT via CCXREF cross-reference.Data AccessReads ACCTDAT, CARDDAT (AIX), CUSTDAT, CCXREF. No update operations.
DescriptionLargest program (4,236 LOC). Extensive field validation for account status, credit limits, dates, ZIP codes. Uses CSLKPCDY lookup tables and 18+ COPY REPLACING instances.Data AccessReads/updates ACCTDAT, reads CUSTDAT and CCXREF.
DescriptionPaginated browse of CARDDAT via STARTBR/READNEXT. Supports PF7/PF8 paging. Selection transfers to COCRDSLC (view) or COCRDUPC (update) via XCTL.Data AccessReads CARDDAT with browse operations.
DescriptionRead-only card detail display. Reads CARDDAT by card number, joins with CUSTDAT for customer info. PF5 transfers to COCRDUPC for editing.Data AccessReads CARDDAT, CUSTDAT.
DescriptionValidates card number, embossed name, expiration date, active status. Date validation via CSUTLDWY/CSUTLDPY copybooks. 148 IF statements, 21 GO TOs.Data AccessUpdates CARDDAT.
DescriptionPaginated browse of TRANSACT file. Supports forward/backward paging. Selection transfers to COTRN01C for detail view.Data AccessReads TRANSACT with browse operations.
DescriptionRead-only transaction detail display. Shows full transaction record including card number, amount, date, and type.Data AccessReads TRANSACT by transaction ID.
DescriptionValidates card via CCXREF, checks account is active in ACCTDAT, generates transaction ID with timestamp, writes new record to TRANSACT.Data AccessReads CCXREF, ACCTDAT. Writes TRANSACT.
DescriptionUser selects report type and parameters. Submits batch job via CICS TD queue (WRITEQ TD to JOBS queue). TD queue routes to internal reader for JCL submission.Data AccessWrites to TD Queue JOBS.
DescriptionValidates account via CCXREF and ACCTDAT. Uses ASKTIME/FORMATTIME for timestamp. Creates payment transaction in TRANSACT and updates account balance.Data AccessReads CCXREF, ACCTDAT. Writes TRANSACT. Updates ACCTDAT balance.
DescriptionAdmin menu dispatcher. Routes to user management (CU00–CU03) and optional transaction type management (CTLI, CTTU) via XCTL.Options1: List Users, 2: Add User, 5: Tran Type List (optional), 6: Tran Type Edit (optional).
DescriptionPaginated browse of USRSEC file. Supports forward/backward paging. Selection transfers to COUSR02C (update) or COUSR03C (delete).Data AccessReads USRSEC with browse operations.
DescriptionValidates user ID uniqueness via EXEC CICS READ with RESP check. Writes new record to USRSEC.Data AccessReads (uniqueness check) and writes USRSEC.
DescriptionReads existing user record with UPDATE option. Validates changes and rewrites record to USRSEC.Data AccessReads (with UPDATE) and rewrites USRSEC.
DescriptionConfirms deletion, reads record with UPDATE option, then deletes record from USRSEC.Data AccessReads (with UPDATE) and deletes from USRSEC.
DescriptionDisplays summary of pending authorization requests from IMS database. Paginated browse with selection to detail view.ModuleAuthorization IMS-DB2-MQ (Optional). Requires IMS DB, DB2, MQ.
DescriptionDisplays detailed pending authorization record. Links to COPAUS2C helper for processing.ModuleAuthorization IMS-DB2-MQ (Optional). Requires IMS DB.
DescriptionMQ-triggered processor. Receives auth request from queue, validates card via CCXREF, checks IMS pending auth DB, logs fraud check to DB2 AUTHFRDS, sends approval/denial via MQ reply queue.ModuleAuthorization IMS-DB2-MQ (Optional). No BMS map — background process.
DescriptionINSERT new or UPDATE existing transaction types in DB2 TRNTYPE table. Complex add/edit form with extensive validation.ModuleTransaction Type DB2 (Optional). Requires DB2.
DescriptionDB2 cursor-based paginated listing of TRNTYPE table. Supports delete operation with confirmation.ModuleTransaction Type DB2 (Optional). Requires DB2.
DescriptionSends system date inquiry request via MQ and receives response. No BMS map — uses MQ request/reply pattern.ModuleVSAM-MQ (Optional). Requires MQ.
DescriptionAsynchronous account detail inquiry through MQ messaging. Sends request and receives account data via MQ reply queue.ModuleVSAM-MQ (Optional). Requires MQ, VSAM ACCTDAT.

⚡ = Optional module transaction

VSAM Data Architecture

11+ VSAM KSDS files with alternate indexes, cross-references, and manually maintained referential integrity.

FileTypeCopybookKeyDescription
DatasetAWS.M2.CARDDEMO.USRSEC.VSAM.KSDSRecord LayoutUser ID (8), Password (8), First Name (20), Last Name (20), User Type (1 — 'A' for admin). Key: SEC-USR-ID.Used ByCOSGN00C (authentication), COUSR00C–03C (user CRUD).
DatasetAWS.M2.CARDDEMO.ACCTDATA.VSAM.KSDSRecord LayoutAccount ID (11), Status, Credit Limit, Current Balance, Open Date, Expiration Date, Reissue Date, Group ID. Key: ACCT-ID.Used ByCOACTVWC, COACTUPC, CBTRN02C, CBACT04C, COBIL00C, CBSTM03A. Central to most operations.
DatasetAWS.M2.CARDDEMO.CARDDATA.VSAM.KSDSRecord LayoutCard Number (16), Account ID (11), CVV Code (4), Embossed Name, Expiration Date, Active Status. Key: CARD-NUM. AIX path: CARDAIX.Used ByCOCRDLIC, COCRDSLC, COCRDUPC, COACTVWC. ⚠️ Contains unencrypted PCI data (SEC-004).
DatasetAWS.M2.CARDDEMO.CUSTDATA.VSAM.KSDSRecord LayoutCustomer ID (9), First/Last Name, Address, SSN (9), Government ID, DOB, FICO Score, Phone, Email. Key: CUST-ID.Used ByCOACTVWC, COCRDSLC, CBSTM03A, COPAUA0C. ⚠️ Contains unencrypted PII (SEC-004).
DatasetAWS.M2.CARDDEMO.CARDXREF.VSAM.KSDSRecord LayoutCard Number (16), Account ID (11), Customer ID (9). Key: XREF-CARD-NUM. AIX path: CXACAIX (by account).Used ByCOTRN02C, CBTRN02C, CBACT04C, COBIL00C, CBSTM03A, COPAUA0C. Central cross-reference — manually maintained.
DatasetAWS.M2.CARDDEMO.TRANSACT.VSAM.KSDSRecord LayoutTransaction ID (16), Card Number, Amount, Date/Time, Type Code, Category Code, Description. Key: TRAN-ID.Used ByCOTRN00C–02C (online), CBTRN02C (batch posting), CBTRN03C (reporting), CBACT04C (interest). Primary transaction store.
DescriptionSequential file containing daily transactions for batch posting. Input to POSTTRAN (CBTRN02C) job.FlowLoaded as sequential input → processed by CBTRN02C → records posted to TRANSACT master and balances updated in ACCTDAT/TCATBALF.
DescriptionReference data for interest rate disclosure groups. Compound key: Account Group ID + Transaction Type Code + Transaction Category Code.Used ByCBACT04C (interest calculation) — looks up rates by account group and transaction category.
DescriptionTracks balances by account, transaction type, and category. Compound key: Account ID + Type Code + Category Code.Used ByCBTRN02C (updated during posting), CBACT04C (read for interest calculation, updated with new balance).
DescriptionReference data defining transaction category types. Compound key: Transaction Type Code + Category Code.Used ByCBTRN03C (transaction reporting — joins for category descriptions).
DescriptionReference data defining transaction types. Key: 2-byte transaction type code.Used ByCBTRN03C (reporting). Also managed via DB2 TRNTYPE table in optional Transaction Type DB2 module.

Documentation Files

All 35 markdown documentation files available for download. Filter by category or download individually.

📋
README.md
Root — Master Navigation
📖
project-overview.md
Root — Application Summary
⚠️
technical-debt-report.md
Root — AWS Transformation Recommendations
🏗️
system-overview.md
architecture/ — High-Level System Architecture
🏗️
components.md
architecture/ — Module Inventory
🏗️
dependencies.md
architecture/ — Dependency Graphs
🏗️
patterns.md
architecture/ — Design Patterns
🔄
business-logic.md
behavior/ — Business Rules
🔄
workflows.md
behavior/ — End-to-End User Journeys
🔄
decision-logic.md
behavior/ — Decision Trees
🔄
error-handling.md
behavior/ — CICS Error Handling
📚
program-structure.md
reference/ — 44 Programs Structure
📚
interfaces.md
reference/ — Inter-Program Interfaces
📚
data-models.md
reference/ — Record Layouts & VSAM
📚
api-reference.md
reference/ — CICS Transaction APIs
📊
code-metrics.md
analysis/ — LOC & File Statistics
📊
complexity-analysis.md
analysis/ — Cyclomatic Complexity
📊
dependency-analysis.md
analysis/ — Dependency Matrix
📊
security-patterns.md
analysis/ — Security Review
⚠️
summary.md
technical-debt/ — Comprehensive Overview
⚠️
outdated-components.md
technical-debt/ — Legacy Components
⚠️
security-vulnerabilities.md
technical-debt/ — Security Issues
⚠️
maintenance-burden.md
technical-debt/ — High-Complexity Areas
⚠️
remediation-plan.md
technical-debt/ — Prioritized Actions
🚀
component-order.md
migration/ — Migration Sequencing
🚀
test-specifications.md
migration/ — Validation Test Cases
🚀
validation-criteria.md
migration/ — Equivalence Checks
📐
system-components.md
diagrams/structural/ — Component Diagram
📐
module-dependencies.md
diagrams/structural/ — Module Dependencies
📐
transaction-flows.md
diagrams/behavioral/ — Transaction Flows
📐
data-flows.md
diagrams/data-flow/ — Data Flow Diagrams
📐
system-context.md
diagrams/architecture/ — System Context
🔧
cics-processing.md
specialized/mainframe/ — CICS Transaction Processing
🔧
vsam-operations.md
specialized/mainframe/ — VSAM File Operations
🔧
db2-ims-mq-jcl.md
specialized/mainframe/ — DB2, IMS, MQ, JCL