Joined: 06 Dec 2002 Posts: 117 Topics: 44 Location: Chennai,India
Posted: Fri Aug 25, 2006 6:09 am Post subject: Access Getmain storage which was Acquired from previous task
Hi Gurus,
A program doing GETMAIN(without SHARED option) for a linkage section field. Program is storing the GETMAIN storage address in COMMAREA. The program is not doing FREEEMAIN for that storage. At the end of the task the GETMAINed storage will be released by CICS as per the manual.
When the transaction invoked again, can i access the previosly GETMAINed storage using the pointer stored in commarea ?.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Fri Aug 25, 2006 7:37 am Post subject:
ravikumar_sri2001,
The storage that a task gets is available until it is released with a FREEMAIN command. For an area obtained without the SHARED option, only the task that acquired the storage may release it, and at task end CICS automatically releases such storage not already released. Note that any storage acquired with the SHARED option is accessible by all tasks, including those that are running with transaction isolation.
A SHARED area, on the other hand, is not released at task end and remains until explicitly freed; any task may issue the FREEMAIN. This means that you can use SHARED storage in task-to-task communication.
You canNOT, however, use the storage obtained as a TIOA for subsequent terminal operations, because this could cause storage violations.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum