Storage control

The CICS® storage control facility controls requests for main storage to provide intermediate work areas and other main storage needed to process a transaction.

Java and C++

The application programming interface described here is the CICS API, which is not used in Java™ programs. For information about Java programs using the JCICS classes to access storage control services, see Java programming using JCICS and the JCICS Javadoc documentation. For information about C++ programs using the CICS C++ classes, see Using the CICS C++ OO foundation classes.

CICS storage control facility

CICS makes working storage available within each command-level program automatically, without any specific request from the application program, and provides other facilities for intermediate storage, both within and among tasks. Design for performance describes storage within individual programs. If you need working storage in addition to the working storage provided automatically by CICS, however, you can use the following commands:
  • GETMAIN to get and initialize main storage
  • FREEMAIN to release main storage

You can initialize the acquired main storage to any bit configuration by supplying the INITIMG option on the GETMAIN command; for example, zeros or EBCDIC blanks.

CICS releases all main storage associated with a task when the task is ended normally or abnormally. This includes any storage acquired, and not subsequently released, by your application program, except for areas obtained with the SHARED option. This option of the GETMAIN command prevents storage being released automatically when a task completes.

If you use the GETMAIN command with the SHARED option, and the FREEMAIN command, you could create inter-transaction affinities that adversely affect the ability to perform dynamic transaction routing.

To help you identify potential problems with programs that issue these commands, you can use CICS Interdependency Analyzer. See CICS Interdependency Analyzer for z/OS for information about this utility and see Affinity for information about transaction affinity.

If there is no storage available when you issue your request, CICS suspends your task until space is available, unless you specify the NOSUSPEND option. While the task is suspended, it may be canceled (timed out) if the transaction definition specifies SPURGE(YES) and DTIMOUT(mmss). NOSUSPEND returns control to your program if storage is not available, allowing you to do alternative processing, as appropriate.