Task and Transaction..



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

Task and Transaction..

Postby uday123 » Tue Apr 13, 2010 7:28 pm

Hi,

Can anyone explain relation b/w cics pgms, transaction and a task ? when do we say that the task is done and when do we say that a transaction is done and how do we accomplish this in cics appl pgm. Can a transaction be across multiple pgms? or can a task be across multiple pgms?

Thanks
Uday
uday123
 
Posts: 29
Joined: Fri Feb 06, 2009 6:13 am
Has thanked: 0 time
Been thanked: 0 time

Re: Task and Transaction..

Postby Robert Sample » Tue Apr 13, 2010 8:46 pm

A transaction is a program that can be invoked via a transaction code (such as ABCD). A task is a transaction executing (usually but not always on a terminal). The difference is that a transaction is a definition while a task is actually being executed in CICS. The transaction is complete when it does an EXEC CICS RETURN END-EXEC. Multiple programs may be invoked as part of the transaction. Tasks, since they invoke transactions, may also involve multiple programs. Each time the transaction does EXEC CICS START, however, the task number changes.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Task and Transaction..

Postby Anamikaa » Fri Apr 16, 2010 3:38 am

Transaction
A transaction is a piece of processing initiated by a single request. This is usually from an end-user at a terminal, but may 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. TheCICS Internet Guide and the CICS External Interfaces Guide describe different ways of running CICS transactions.

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.

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 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 documentation.

Task
You will also see the word task used extensively in CICS documentation. 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. type. 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 as analogous to a thread.. When the transaction completes, the task is terminated.
Anamikaa
 
Posts: 4
Joined: Fri Apr 16, 2010 3:31 am
Has thanked: 0 time
Been thanked: 0 time

Re: Task and Transaction..

Postby uday123 » Thu Apr 22, 2010 11:00 am

Thanks for your replies , Robert and Anamikaa.. :)
uday123
 
Posts: 29
Joined: Fri Feb 06, 2009 6:13 am
Has thanked: 0 time
Been thanked: 0 time


Return to CICS

 


  • Related topics
    Replies
    Views
    Last post