Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 15: CICS Real-World Projects and Interview Preparation


CICS COBOL Banking Application

A CICS COBOL banking application is a set of online transactions that let bank staff open accounts, check balances, deposit money and withdraw money.

Each transaction has its own trans-id and COBOL program. A menu program ties them together, exactly like the INVMENU menu program design described in the CICS program design material.

What the banking application contains

  • A menu program (trans-id BKMN) that lists the options: inquiry, deposit, withdrawal, new account.
  • An account inquiry program (trans-id BKIN) that reads the account master file and shows balance and customer details.
  • A deposit/withdrawal program (trans-id BKUP) that updates the balance.
  • A new-account program (trans-id BKNA) that writes a new record to the account master file.
  • All programs are pseudo-conversational: each screen ends with RETURN TRANSID so the next user response restarts the program.

How the programs are connected

  • Trans-ids are defined in the CSD; each transaction definition points to its COBOL program.
  • The menu program transfers control with EXEC CICS XCTL PROGRAM('BKINQ') - XCTL does not return to the menu program.
  • Programs that need a shared routine use EXEC CICS LINK with a COMMAREA, and the called program returns with EXEC CICS RETURN.
  • Pressing PF3 on any screen transfers control back to the menu program with another XCTL.
  • The account number is passed between programs in the COMMAREA or through a temporary storage queue.
  • Example:-
    EVALUATE WS-OPTION WHEN '1' EXEC CICS XCTL PROGRAM('BKINQ') END-EXEC WHEN '2' EXEC CICS XCTL PROGRAM('BKUPD') END-EXEC WHEN '3' EXEC CICS XCTL PROGRAM('BKNEW') END-EXEC WHEN OTHER MOVE 'INVALID OPTION - TRY AGAIN' TO MSGO END-EVALUATE.

Design points interviewers ask about

  • Why pseudo-conversational: the banking application must free CICS resources between screens because hundreds of tellers use it at once.
  • Event/response chart: for every screen list each user action (Enter, PF3, PF12) and what the program must do.
  • Key map and data map: the inquiry uses a key map for the account number and a data map for the details, like the CUSTMNT1 customer maintenance design.
  • Error handling: every file read checks RESP so a wrong account number shows a message instead of abending.





© copyright mainframebug.com
Privacy Policy
MainframeBug Assistant