GETMAIN COMMAND



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

GETMAIN COMMAND

Postby sinmani » Fri Mar 23, 2012 5:39 pm

GETMAIN command?? Will program not work if we do not give GETMAIN?
GETMAIN command allocates memory for the program but why do we need to provide it explicitly??
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
sinmani
 
Posts: 93
Joined: Thu Mar 22, 2012 10:02 am
Has thanked: 14 times
Been thanked: 0 time

Re: GETMAIN COMMAND

 

Re: GETMAIN COMMAND

Postby BillyBoyo » Fri Mar 23, 2012 5:50 pm

Depends. If your program needs to acquire extra memory, it'll need the GETMAIN. If it doesn't need it, it doesn't need it. Find a senior at your site, they will be able to sit you down and explain it better than we can from scratch. Plus, they're paid for that :-)
BillyBoyo
Global moderator
 
Posts: 3759
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 256 times

Re: GETMAIN COMMAND

Postby sinmani » Fri Mar 23, 2012 6:15 pm

what I have learnt is that if we do not give GETMAIN command and extra memory is needed.
The program tries to get that extra memory. If it doesn't gets it will try again later.
But if we give GETMAIN command and the extra memory is not available then we get an error NOSTG.
Our program will abend if we do not HANDLE this abend.

So I am wondering why do we bother to give GETMAIN when it works bettter without it?? :?:
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
sinmani
 
Posts: 93
Joined: Thu Mar 22, 2012 10:02 am
Has thanked: 14 times
Been thanked: 0 time

Re: GETMAIN COMMAND

Postby Robert Sample » Fri Mar 23, 2012 6:45 pm

You have a VSAM file that contains a table your CICS programs need. You could use GETMAIN to allocate memory as shared, read the table in memory, and allow multiple tasks to use the table without incurring the overhead of reading the table from the VSAM file so many times.
Robert Sample
Global moderator
 
Posts: 3121
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 182 times


Return to CICS

 


  • Related topics
    Replies
    Views
    Last post