Sharing data in an object

The services of data-in-virtual are task-oriented. When a user issues IDENTIFY, an association is established between the ID assigned and the user's task. The type of association differs, however, depending on whether the task is authorized or not. The authorized task runs in supervisor state, has a system key (0-7), or has APF authorization. The unauthorized task runs in problem program state with a user key and with no APF authorization.
  • For the unauthorized user, using data-in-virtual services for a specific ID is strictly local to its immediate task. That is, all services for a particular ID must be requested by the same task that requested IDENTIFY and obtained the ID.
  • For the authorized user, one task can issue IDENTIFY, ACCESS, and UNACCESS while authorized subtasks of that task can request all the other services by using the ID returned by IDENTIFY. If you specified TYPE=HS with IDENTIFY, you cannot issue MAP or SAVE unless your task is the same as the one that issued IDENTIFY.

Any task, authorized or not, can reference or change the data in a mapped virtual storage window, even if the window was mapped by another task, and even if the object was identified and accessed by another task. As long as the task can address the window, it is allowed to reference or change the included data. However, only the task that issued the IDENTIFY can issue the SAVE to change the object.

When more than one user has the ability to change the data in one storage area, you must take steps to serialize their use of the area.

Because data-in-virtual services affect virtual storage, the PSW key of any task that requests a service (under a given ID) must be the same as the PSW key of the task that issued the IDENTIFY (that obtained the ID). This is not required if the task has PSW key zero.