EXEC CICS
The way a program asks CICS to do something, such as read a record, send a screen or call another program.
Also written EXEC CICS command, CICS command, CICS API, END-EXEC, RESP
A CICS program does not use COBOL's own statements for files, screens or calling other programs. It asks CICS to do those things with commands that start with EXEC CICS and end with END-EXEC.
For example, EXEC CICS READ FILE('ACCOUNTS') INTO(WS-ACCOUNT) RIDFLD(WS-ACCT-NO) END-EXEC reads one record by key. Other common commands are SEND MAP and RECEIVE MAP for screens, LINK and XCTL to run other programs, WRITEQ TS and READQ TS for temporary storage, and RETURN to end the task.
Before compiling, the commands are turned into ordinary calls by a translator, which is usually built into the COBOL compiler today.
Every command can fail, for example when a record is not found. Adding RESP(WS-RESP) to a command tells CICS to put the result in a field instead of ending the task, and the program then checks that field. Checking RESP after each command is the modern, clear way to handle errors in CICS programs.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- CICSThe transaction manager that runs online mainframe applications, and the software behind a great many screens bank staff use.
- CICS transactionOne unit of online work in CICS: the whole exchange of receiving a request, doing the work, and sending a response.
- BMS mapThe definition of a CICS screen: where each field sits, how long it is, and how it is highlighted.
- COMMAREAThe communication area: a block of data a CICS program passes to another program, or keeps for the next step of a conversation.
- EIBThe EXEC Interface Block: a set of fields CICS fills in for every task, telling the program about the current transaction.
- Embedded SQLSQL statements written directly inside a COBOL program, marked off so they can be prepared before compiling.