View previous topic :: View next topic
|
Author |
Message |
bnsahoo
New User
Joined: 06 Jun 2005 Posts: 18 Location: mumbai,india
|
|
|
|
In CICS to update the KSDS file which has 1 record,i am reading the file in read update mode and rewriting it.i am using simple cics command READ-UPDATE and REWRITE.Do i need to perform getmain and freemain for any IO opertion of the file.It is madatory or optional?can anybody tell why do we need GETMAIN before any file I/O operation?
Thanks |
|
Back to top |
|
|
meetreks
New User
Joined: 28 Sep 2006 Posts: 26 Location: Edinburgh
|
|
|
|
Hi,
REad for Update of a VSAM file in CICS locks the record for exclusive use and the only statements we can have after that is a Rewrite or a Release. This however has no direct relation with GETMAIN. GETMAIN allocates resources which you want to use exclusivley, for ex, it can be a chunck of data or any other resource. |
|
Back to top |
|
|
gsnvsr
New User
Joined: 06 Jul 2005 Posts: 40
|
|
|
|
bnsahoo wrote: |
In CICS to update the KSDS file which has 1 record,i am reading the file in read update mode and rewriting it.i am using simple cics command READ-UPDATE and REWRITE.Do i need to perform getmain and freemain for any IO opertion of the file.It is madatory or optional?can anybody tell why do we need GETMAIN before any file I/O operation?
Thanks |
GETMAIN is used to manually acquire memory if you have a need to pass data exceeding 32k b/n different programs in Linkage. If the data being passed b/n programs is less than 32 k, you can define it under DFHCOMMAREA and CICS will do the memory management for you. |
|
Back to top |
|
|
|