Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Why do we need GETMAIN before any file I/O operation

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
bnsahoo

New User


Joined: 06 Jun 2005
Posts: 18
Location: mumbai,india

PostPosted: Tue Oct 24, 2006 12:11 pm    Post subject: Why do we need GETMAIN before any file I/O operation
Reply with quote

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
View user's profile Send private message

meetreks

New User


Joined: 28 Sep 2006
Posts: 26
Location: Edinburgh

PostPosted: Tue Oct 24, 2006 2:18 pm    Post subject:
Reply with quote

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
View user's profile Send private message
gsnvsr

New User


Joined: 06 Jul 2005
Posts: 40

PostPosted: Tue Oct 24, 2006 2:46 pm    Post subject: Re: GETMAIN clarification
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us