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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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