Q: What is the performance gain by using the Clear Pool (CLRPOOL) and Set Object Access (SETOBJACC) commands? Does CLRPOOL only work against those objects defined through SETOBJACC?
A: The CLRPOOL command is used to initialize a pool of memory. It removes all objects from a specified pool, clearing the memory allocated to the pool, regardless of whether the objects were brought in using the SETOBJACC command. CLRPOOL is an important step before using the SETOBJACC command-if the memory in the pool we use for the SETOBJACC command is not free, our objects may or may not be brought into main memory.
Using the CLRPOOL and SETOBJACC commands consists of four basic steps:
1. Finding or creating a pool in which to datapool (placing an object in a storage pool). 2. Finding the programs and files to datapool. 3. Initializing the memory used for datapooling. 4. Datapooling.
The best objects for datapooling are those that are read many times from disk. Programs that are called many times are candidates, as well as many of the common files. In any case in which record blocking increases performance, datapooling will do even better-even in instances where blocking is not possible (i.e., reading a file through a logical file). In this example, you could datapool both the physical and logical files. The performance gains I have seen for batch jobs are really incredible.
Editor's Note: Michael Catalani has written an article which discusses the topic of using the CLRPOOL and SETOBJACC commands in detail. Look for his article to be published in an upcoming issue of MC.