What CICS is and how work arrives
CICS is a long-running program that hosts your programs. It handles the terminal, the security check, the storage, the database connection and the recovery — so your program can be small and do one thing.
The vocabulary, in order
| Term | Meaning |
|---|---|
| Region | One running CICS address space. A site has many: production, test, and often separate ones for terminal handling and application logic. |
| Transaction | A four-character ID that names a unit of work, e.g. PAY1 |
| Program | The load module the transaction runs |
| Task | One execution of a transaction for one user — the thing that actually runs |
| Map / BMS | A screen definition: where fields sit and how they behave |
| CEDA / CEMT | The definition and master-terminal transactions used to configure and control a region |
The key constraint: everything is shared
Hundreds of users run tasks in the same region at the same time. A single program that loops, waits, or holds a resource degrades the service for everyone in that region. This one fact explains every rule in the CICS programming model.
- Do not do long-running work. Anything that takes seconds belongs in batch or in a separate region.
- Do not hold resources across a screen. A user might go to lunch mid-transaction.
- Do not use standard COBOL file I/O. File access goes through CICS commands so it can participate in recovery.
- Do not use STOP RUN. Return control to CICS with
EXEC CICS RETURN.
Common mistakes
Reading a file end to end online will hold the region and time out. Online reads one record and returns.
CICS keeps the loaded copy in storage. Your new module is in the library and not in use until you tell CICS to fetch it.
It ends the task abnormally from CICS's point of view. Always EXEC CICS RETURN.
What you will see at work
- Region names are as important as LPAR names. Learn which regions your application runs in.
- Terminal-owning and application-owning regions are often split; a transaction may run in a different region from the one the user connected to.
- Your access to CEMT will likely be read-only at first, which is normal and sensible.
Key terms
Check your understanding.
Take this lesson's quiz and save your progress. Free.