Go To Top Go Up Go Back Go Forward

6.4. FMS Memory Management

FMS contains a memory management system that you can use for scratch data storage. When FMSINI is called, a pool of memory is created. FMS allocates memory from this pool as required.

The size of the memory pool is determined by the FMS parameter MAXMD. FMS keeps track of the memory used out of the pool with the Parameter MDUSED. At any point you may determine how much memory is left in the pool as follows:

CALL FMSIGT('MAXMD', MAXMD)
CALL FMSIGT('MDUSED', MDUSED)
MDLEFT = MAXMD - MDUSED

You may allocate memory form this pool for scratch data storage. This has the following advantages for your application: