Summarizing the records in a result set
If you want to analyze or modify a large number of records in a result set, you might find it useful to summarize those records.
When you issue a GROUP command, CICSPlex® SM summarizes the records in one result set to create a new, summarized result set. A summarized result set is a special type of result set. It contains summary resource table records that correspond to one or more records in the source result set.
You can modify the records in a summarized result set using the PERFORM or SET commands. This is equivalent to modifying all the records in the source result set that are represented by a given summary record. However, since each record in a summarized result set has a single OBJSTAT record associated with it (rather than one for each of the source records being modified), you may want to use the FETCH DETAIL command to determine the results of a summary action.
Another method of working with individual records from a summarized result set is by using the EXPAND command. This is similar to the FETCH command when used with the DETAIL option, but EXPAND creates a new result set containing one record for each of the records summarized by GROUP in an individual summary record. This allows you to perform further actions on the result set including using additional GROUP or FETCH commands. EXPAND includes a number of options for manipulating the record counter in order to select the summarized record you want to work with. It can also be used in conjunction with the MARK and UNMARK commands.
The OBJSTAT records in a source result set are not summarized when you issue a GROUP command. So the OBJSTAT records in a summarized result set do not represent the OBJSTAT information for all of the source records. However, the OBJSTAT records in a summarized result set do include a summary count, which indicates how many source records were combined to produce each summary record.
- A summarized result set cannot exist without the source result set from which it was built. If you discard a source result set, all the summarized result sets that were built from it are also discarded.
- You can reuse a summarized result set only to resummarize the records in the same source result set. An existing summarized result set cannot be used as the target of a GROUP command for a different source result set.
- A summarized result set cannot be used as the source of a COPY command.
- If you modify a source or summarized result set in any way, all
the summarized result sets that have been built from the source result
set are rebuilt. Note: To prevent this from happening, you can specify the NOREFRESH option on the PERFORM or SET command.