View previous topic :: View next topic
|
Author |
Message |
shyansh_hercules Warnings : 2 New User
Joined: 12 Oct 2008 Posts: 4 Location: Pune
|
|
|
|
Hi...
I want to know what is the difference between exec cics return and start...also between return and call (level wise)....
We can also use cobol call statements for passing data between two programs...then what is the difference between passing data using cobol call and commarea....plz explain me in terms of memory storage....
and the last query...as per my knowledge commarea is a block of memory..is that block of memory is common to all regions defined or every region owns its own commarea when it is loaded ..
TIA.
Regards. |
|
Back to top |
|
|
Kevin Wailes
New User
Joined: 29 Aug 2008 Posts: 10 Location: UK
|
|
|
|
I think you need to read the CICS Application Programming Guide |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
This shows a complete lack of understanding of commarea ...
Quote: |
and the last query...as per my knowledge commarea is a block of memory..is that block of memory is common to all regions defined or every region owns its own commarea when it is loaded .. |
You really, really, really need to read the CICS Application Programming Reference and Guide both. Commarea is not even common to a region -- it is a specific chunk of memory passed to a CICS program by another CICS program and used to contain data needed between program invocations. There is certainly no block of memory in a CICS region set aside for commarea -- a commarea is allocated from memory when needed. |
|
Back to top |
|
|
shyansh_hercules Warnings : 2 New User
Joined: 12 Oct 2008 Posts: 4 Location: Pune
|
|
|
|
Quote: |
Commarea is not even common to a region -- it is a specific chunk of memory passed to a CICS program by another CICS program and used to contain data needed between program invocations. There is certainly no block of memory in a CICS region set aside for commarea -- a commarea is allocated from memory when needed. |
Robert i will surely go through those books and clear my concept......
But for the time being please clear my doubt which is still uncleared....
If it is a chunk of memory used to contain between program invocations....then what is benifit of using commarea..as the same thing happens when we pass data using call statement (if by content).....
i mean what is the actual difference between data passing technique using commarea and a simple call statement?[/quote] |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
Quote: |
Robert i will surely go through those books and clear my concept......
But for the time being please clear my doubt which is still uncleared....
|
suggest you also attend a CICS application programming class.
in the meantime, keep reading. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
When you're doing CICS, you typically (in a pseudo-conversational system) send a map and then return to CICS with a transaction ID and COMMAREA. When the terminal user hits the enter key, that transaction kicks off and can receive the map to find out what was keyed into it. You cannot use pseudo-conversational without returning to CICS -- which you cannot do through a COBOL call. The commarea is typically used to tell the transaction to receive the map rather than send the map, among other things.
COMMAREA is allocated and managed by CICS. If you put together a batch of COBOL calls, your original transaction must stay in memory until the entire thing ends -- potentially wasting resources and causing deadlocks or other nasty things.
Mechanically, there's no real difference between passing COMMAREA and passing through a COBOL CALL statement, especially if you just look at the memory. However, the system approach and requirements are vastly different -- and most sites I know of absolutely forbid using anything but pseudo-conversational due to the impact. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
The variables in your program are unique to each task. There are situations where you cannot use these variables in passing data.
For example, a pseudoconversation is typically a series of invocations of a program, each invocation being a separate CICS task. In the pseudoconversation you might EXEC CICS RETURN TRANSID(ABCD), which invokes the next portion of the pseudoconversation. Since the old task has terminated, the old variables are lost and a fresh set of variables are acquired for the new task.
To pass the values between the separate tasks in a pseudoconversation, a COMMAREA is used and is specified in the return as EXEC CICS RETURN TRANSID(ABCD) COMMAREA(MY_COMMAREA).
Garry. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Keep in mind that COMMAREA is not a common area - it is a Communications Area. |
|
Back to top |
|
|
|