Storage control functions
There are seven XPI storage control functions. These are the DFHSMMCX macro
calls GETMAIN, FREEMAIN, INQUIRE_ELEMENT_LENGTH, and
INQUIRE_TASK_STORAGE,and the DFHSMSRX calls INQUIRE_ACCESS,
INQUIRE_SHORT_ON_STORAGE, and SWITCH_SUBSPACE.
DFHSMMCX calls cannot be used in any exit program invoked from any global
user exit point in the:
vDispatcher domain
vDump domain
vMonitor domain
vStatistics domain
vTransient data program.
The GETMAIN call
GETMAIN acquires an element of storage for use by your exit program. Youcan
ask for a particular CLASS of storage, and you can request that it be initialized to a
single-byte value.
Storage in the following classes, acquired by a GETMAIN call, is released by CICS
when the TCA being used at the time of the acquisition terminates:
CICS
CICS24
USER
USER24.
In contrast, storage in the following classes is not released automatically at
task-end: you should use the FREEMAIN call to release it:
SHARED_CICS
SHARED_CICS24
SHARED_USER
SHARED_USER24
TERMINAL.
In addition, some user exits may be invoked from system tasks, and in these
circumstances storage is not released until the next CICS shutdown. Therefore you
should use FREEMAIN to release all storage areas acquired by GETMAIN as soon
as you have finished using them.
storage control functions
Chapter3. The user exit programming interface (XPI) 361