Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

end of cics transaction or task 1

Status
Not open for further replies.

pbfamily

Programmer
Nov 23, 2006
1
US
Hi, I am new to CICS and I have not found an answer in any of the textbooks read. I have search the internet looking for an answer but they are all vague.
First, a transaction is initiated by entering a trans-id that invokes or loads the first cics applications program.
That according to all books, starts a task for that user entering the trans-id.
Does the task end with a return command without a trans-id as a parameter? or the task ends with a return command regardless of the trans-id parameter.
When does the transaction end? does it end when the program is unloaded from main memory?
What if 3 users enter the same trans-id? I know that 3 tasks will be started. Do we have 3 different transactions also?
Please help!
 
By default, a CICS task starts a transaction, and terminates the transaction when it finishes, committing any updates to protected resources. Unless you take some deliberate steps to make it behave differently (SYNCPOINT, SYNCPOINT ROLLBACK etc) then any unhandled error occurring during the course of the transaction will result in the rollback of any updates to resources.

CICS tasks can be started in a number of ways, including typing in the transid as you have noted.

If several of the same transactions arrive at the same time, although they (normally) share the same re-entrant copy of the code, they each get their own task structure, transaction, and copy of working storage. Hence they do not impact on each other, unless they are contending for common resources such as update locks on the same row in a database.

Each transaction gets a unique number (EIBTRNID). When the program finishes with EXEC CICS RETURN[sup]1[/sup], all the working storage is freed and the transaction ends. The program is not normally unloaded, both because it may be in use by another concurrent transaction, and so that it does not have to be reloaded the next time it is required.

[sup]1[/sup] The LE/370 CICS runtime library also intercepts native RETURN and GOBACK calls and processes them in a similar way.

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top