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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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