CICS® allows you
to keep your application logic separate from your application resources.
To develop and run CICS applications,
you need to understand the relationship between CICS programs, transactions, and tasks.
These terms are used throughout CICS publications
and appear in many commands:
- Transaction
- A transaction is a piece of processing initiated by a single request.
This is usually from an end user at a terminal, but might also be
made from a Web page, from a remote workstation program, from an application
in another CICS system, or
triggered automatically at a predefined time. The CICS Internet Guide and the CICS External Interfaces Guide describe
different ways of running CICS transactions.
A CICS transaction is given a 4-character
name, which is defined in the program control table (PCT).
- Application program
- A single transaction consists of one or more application programs that,
when run, carry out the processing needed.
However, the term transaction is
used in CICS to mean both a
single event and all other transactions of the same type. You describe
each transaction type to CICS with
a transaction resource definition. This definition gives the
transaction type a name (the transaction identifier or TRANSID) and
tells CICS several things about
the work to be done, such as what program to invoke first and what
kind of authentication is required throughout the execution of the
transaction.
You run a transaction by submitting its TRANSID
to CICS. CICS uses the information recorded in the TRANSACTION
definition to establish the correct execution environment, and starts
the first program.
- Unit of work
- The term transaction is now used extensively in the IT industry
to describe a unit of recovery or what CICS calls
a unit of work. This is typically a complete operation that
is recoverable; it can be committed or backed out as an entirety as
a result of a programmed command or system failure. In many cases,
the scope of a CICS transaction
is also a single unit of work, but you should be aware of the difference
in meaning when reading non-CICS publications.
- Task
- You will also see the word task used extensively in CICS publications. This word also
has a specific meaning in CICS.
When CICS receives a request
to run a transaction, it starts a new task that is associated with
this one instance of the execution of the transaction–that is, one
execution of a transaction, with a particular set of data, usually
on behalf of a particular user at a particular terminal. You can also
consider it analogous to a thread. When the transaction completes,
the task is terminated.