You may use this parameter to determine the amount of memory left in the pool. For example:
CALL FMSIMG ('MAXMD' , MAXMD ) CALL FMSIMG ('MDUSED', MDUSED) MDLEFT = MAXMD - MDUSED
will compute the amount of memory left in the pool, MDLEFT. If you try to allocate MDLEFT words of memory and fail, the FMS memory pool may have become fragmented. You may correct this condition by altering the order that you allocate and free memory from the pool. The longest arrays should be allocated first, and so on. Try using the call
CALL FMSCST ('SHOW', 'MEMORY')
to display the current contents of the FMS memory pool.