Implementing Message Formatting Service

After defining the Message Formatting Service, you can create an index directory to control blocks in the staging library, you can define several format libraries on different physical or logical devices, and you can display the contents of the message format buffer pool counters.

INDEX directory

The INDEX function of the MFS service utility creates an index directory to specified control blocks in the staging library, IMS.FORMAT. The IMS initialization process uses the index directory to construct the MFS dynamic directory in a private storage area. This space is separate from the message format buffer pool.

If a requested control block is not found in the message format buffer pool, MFS looks for an entry in the MFS dynamic directory. If found, the entry gives the relative track address for the indexed control block. This allows MFS to issue a direct read without going through the active format library's PDS directory. If the entry is not found, MFS reads the PDS directory, then reads the requested control block. MFS also creates an entry in the MFS dynamic directory for the control block.

The number of entries in the MFS dynamic directory continually increases until the MTO uses the command /CHANGE DIRECTORY MFS. This purges all the entries that were added to the MFS dynamic directory after online initialization.

Error conditions include:

  • IMS abending during initialization if storage is unavailable for the MFS dynamic directory
  • The /MODIFY COMMIT command failing during online change if storage is unavailable for the MFS dynamic directory or the PDS directory index
  • No entries being added to the MFS dynamic directory during online operation if storage is unavailable for the MFS dynamic directory. To add entries to the MFS dynamic directory again, issue a /CHANGE DIRECTORY MFS command, or restart IMS.

Use of concatenated format libraries

You can define several format libraries on different physical or logical devices, thus permitting faster (concurrent) input/output processing. IMS limits the number of data sets that can be concatenated for MFS format libraries, IMS.FORMATA, and IMS.FORMATB to 16. All the concatenations must have like attributes.

Phase 2 of the MFS language utility implicitly deletes an old control block from a format library when a new control block with the same name is defined for that library. However, if the new control block is defined for a different library than the one the old copy is in, there is no implicit deletion. Thus, old and new copies for control blocks can exist simultaneously in different format libraries.

One way to prevent this duplication is to explicitly delete duplicate control blocks, using the MFS service utility SCRATCH function. Another way is to add a DD statement in the MFSUTIL phase 2 JCL for each format library (up to 15) that is to have old control blocks deleted when new versions of those control blocks are defined for the staging library, IMS.FORMAT. Phase 2 makes the deletions and updates the index directory $$IMSDIR (if there is one) in each library to reflect the new contents.

The new DD statements must have labels of the form, FORMATn, where n is a number from 1 to 15, inclusive. Phase 2 only compresses and adds control blocks to the format library defined with a DD statement labeled FORMAT. (FORMAT is the original staging library.)

At IMS online initialization, the index directories ($$IMSDIR) of each of the format libraries are merged into a single MFS dynamic directory for all the format libraries. If a requested control block is not listed in the MFS dynamic directory, MFS reads one PDS directory block from each concatenated library, in sequence, until it finds the control block. This can mean many additional reads if the control block resides on one of the last concatenated libraries.

Pool statistics

Use the /DISPLAY POOL command to display the contents of the message format buffer pool counters. The statistics displayed for directory and fetch input/output operations and pool space use should help in determining the appropriate pool size and number of FREs.

Related reading: See IMS Version 15.4 System Administration for formulas to calculate the format buffer pool size and the number of FREs.