z/OS MVS Programming: Extended Addressability Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


GETSHARED request

z/OS MVS Programming: Extended Addressability Guide
SA23-1394-00

To create a shared memory object, use the IARV64 GETSHARED service. While shared memory storage is like common storage in that it is shared across address spaces, it differs because there is not automatic addressability or access to it.

The shared memory object is allocated when you use the GETSHARED service. To access data in a shared memory object you need to use the IARV64 GETSHARED request to create the shared memory object, and the IARV64 SHAREMEMOBJ request to specify an interest in the shared memory object.

Figure 1. z/OS® R5 Address Space with the default shared area between 2-terabytes and 512-terabytes
ieaa5v02

Notice that when you create a shared memory object, you specify some of the same attributes as when you create a non-shared memory object through the GETSTOR service.

Parameters for the IARV64 GETSHARED service include:
  • SEGMENTS=segments specifies the size, in megabytes, of the shared memory object you are creating.
  • FPROT=YES gives the memory object fetch protection. The default is FPROT=NO.
  • KEY=key specifies its storage key. The key must be in bits 0-3 of the specified byte.
  • CHANGEACCESS=scope identifies whether subsequent CHANGEACCESS requests change the access for only the address space specified (LOCAL), or all the address spaces sharing the memory object (GLOBAL). The default is CHANGEACCESS=LOCAL.
  • USERTKN=usertoken is a required 8-byte token that relates two or more memory objects to each other. Associate the user token with the memory object, so later you can free several shared memory objects at one time.
  • ORIGIN= origin is the name or address that will contain the lowest address in the memory object.

For an example of this request, see Example of creating and using a shared memory object – GETSHARED.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014