AWS CardDemo Converted from CICS COBOL to Java

SoftwareMining used its automated, rule-based COBOL-to-Java translation tools to convert the AWS CardDemo CICS COBOL application into maintainable Java. The converted Java application runs on AWS and is available below for live runtime evaluation.

The original CardDemo is an open-source COBOL and CICS sample application from Amazon Web Services . It simulates a credit-card management system and provides a representative example for evaluating mainframe modernization approaches.

Java Screen Generated from BMS Map CCRDUPA

Java screen generated from AWS CardDemo BMS map CCRDUPA

Java Screen Generated from BMS Map CACTUPA

Java screen generated from AWS CardDemo BMS map CACTUPA
Run the Live COBOL-to-Java CardDemo

SoftwareMining Automatic Conversion Highlights

  • Pure Java output with no emulation layer required.
  • Zero compile-time and runtime errors; effort focused on data migration.
  • Deployed on Apache Tomcat in AWS.
  • C# build is native (.NET 6+ with HTML front end).

Evaluate the Translation Technology

The live CardDemo application demonstrates the behaviour of a COBOL application translated by SoftwareMining. To perform a more comprehensive technical evaluation, organizations can install the evaluation version of the translation tools, translate selected COBOL programs from their own applications, examine the generated Java or C# source code, and run the modernized application using temporary evaluation licences and runtime libraries. Our technical team can assist throughout the evaluation process.

Evaluate COBOL Converter Free Trial

CardDemo: COBOL, Java, and C# Side-by-Side

The sample (from program "COBIL00C") shows how the ACCOUNT-RECORD used in CICS READ is mapped to Object-Relational classes. It also shows how CICS/BMS fields become typed Field objects supporting operations such as setFocus() and setProtected. See BMS Program Cleanup for details.

READ-ACCTDAT-FILE.

EXEC CICS READ
  DATASET   (WS-ACCTDAT-FILE)
  INTO      (ACCOUNT-RECORD)
  LENGTH    (LENGTH OF ACCOUNT-RECORD)
  RIDFLD    (ACCT-ID)
  KEYLENGTH (LENGTH OF ACCT-ID)
  UPDATE
  RESP      (WS-RESP-CD)
  RESP2     (WS-REAS-CD)
END-EXEC

EVALUATE WS-RESP-CD
 WHEN DFHRESP(NORMAL)
   CONTINUE
 WHEN DFHRESP(NOTFND)
   MOVE 'Y' TO WS-ERR-FLG
   MOVE 'Account ID NOT found...' TO WS-MESSAGE
   MOVE -1 TO ACTIDINL OF COBIL0AI
   PERFORM SEND-BILLPAY-SCREEN
 WHEN OTHER
   DISPLAY 'RESP:' WS-RESP-CD 'REAS:' WS-REAS-CD
   MOVE 'Y' TO WS-ERR-FLG
   MOVE 'Unable to lookup Account...' TO WS-MESSAGE
   MOVE -1 TO ACTIDINL OF COBIL0AI
   PERFORM SEND-BILLPAY-SCREEN
END-EVALUATE.
private void readAcctdatFile() {
  accountRecord.assignKeyLength(accountRecord.getAcctId().lengthOf());
  accountRecord.assignResponseCodeField(variables.getWsRespCd());
  accountRecord.read();
  variables.setReasCd(accountRecord.getResponse2Code());

  if (variables.getWsRespCd() == CicsCodes.NORMAL) {
    // ok
  } else if (variables.getWsRespCd() == CicsCodes.NOTFND) {
    variables.setErrFlg("Y");
    variables.setMessage("Account ID NOT found...");
    cobil0ai.getActidin().setFocus();
    sendBillpayScreen();
  } else {
    DisplayHelper.display(this, "RESP:" + variables.getWsRespCdAsStr()
        + " REAS:" + variables.getReasCdAsStr());
    variables.setErrFlg("Y");
    variables.setMessage("Unable to lookup Account...");
    cobil0ai.getActidin().setFocus();
    sendBillpayScreen();
  }
}
private void ReadAcctdatFile() {
  accountRecord.AssignKeyLength(accountRecord.AcctId.LengthOf());
  accountRecord.AssignResponseCodeField(variables.WsRespCd);
  accountRecord.Read()();
  variables.ReasCd = accountRecord.GetResponse2Code();

  if (variables.WsRespCd == CicsCodes.NORMAL) {
    // ok
  } else if (variables.WsRespCd == CicsCodes.NOTFND) {
    variables.ErrFlg = "Y";
    variables.Message = "Account ID NOT found...";
    cobil0ai.Actidin.SetFocus();
    SendBillpayScreen();
  } else {
    DisplayHelper.Display(this, "RESP:" + variables.WsRespCd
        + " REAS:" + variables.ReasCd);
    variables.ErrFlg = "Y";
    variables.Message = "Unable to lookup Account...";
    cobil0ai.Actidin.SetFocus();
    SendBillpayScreen();
  }
}

This example shows OR mapping for ACCOUNT-RECORD and conversion of BMS fields to typed UI fields (for example, setFocus and setProtected). See the full guide: BMS Program Cleanup.

BMS Map Views Translated to JSP/HTML

The images below show design-time HTML views of BMS maps. At runtime, Java builds render as JSP; C# builds render as HTML.

Test drive the Java translation of CardDemo




  © 2026 SoftwareMining is a trademark of Software Modernization Technologies Ltd (UK). Registered in England company no: 07300248. Reg Offices: 79 Stevens House, Jerome Place, Kingston Upon Thames, KT1 1HX, United Kingdom.