Understanding the concepts of sharing data with IARVSERV

As you read this information, refer to Figure 1 for an illustration of the sharing data through the IARVSERV macro.
Figure 1. Data Sharing with IARVSERV
iea99sh1

Suppose that Addr Space A contains data that is required by programs in Addr Space B. A program in Addr Space A can use IARVSERV to define that data to be shared; that data and the storage it resides in are called the source. The program also defines storage in Addr Space B to receive a copy of the source; that storage and its copy of source data are called the target.

The source and its corresponding target form a sharing group. A sharing group can consist of several target areas and one source. For example, suppose another program in Addr Space A defines a portion of data1 (in Addr Space A) as source, and defines a target in Data Space X. That target becomes a member of the sharing group established previously.

All sharing of data is done on a page (4K) basis. If the source page is already a member of an existing sharing group, the target becomes a member of that existing sharing group. A page is called a sharing page if it is a member of a sharing group.

Programs that access the source or targets are called sharing programs. Each sharing program accesses the shared virtual storage as it would any other storage, and may not need to know that the storage is being shared. So, you can allow programs to share data through IARVSERV without having to rewrite existing programs.