Checks for programming problems for data-in-virtual

Table 1 summarizes problems that can result when application programs issue the DIV macro. Use the table to decide if a DIV macro problem is in the application program or in the data-in-virtual component. See z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN for information about using the DIV macro.

Table 1. Summary: Checks for programming problems for data-in-virtual
For a Problem With: Check the Following:
Application program that needs mapped virtual storage to retain values after issuing DIV macro UNMAP request Specify RETAIN=YES on the DIV UNMAP request. If the default RETAIN=NO option is used, the storage appears as if it were freshly obtained with a GETMAIN and then referenced.
DDNAME and disposition used for the data object specified on a DIV macro IDENTIFY request If the application uses several data objects and copies data from one object to another, ensure that DISP=OLD is on the JCL DD statement that defines the linear data set for any data object to be updated.
The linear data set for a DIV macro IDENTIFY request (TYPE=DA) Ensure that the linear data set is a cataloged VSAM data set and defined as LINEAR.

To list the catalog entry for data set characteristics, use the access method services LISTC command. See z/OS DFSMS Access Method Services Commands.

MAP, IDENTIFY, and ACCESS requests made by the same task If the MAP request was made before an IDENTIFY and ACCESS, ensure that the ACCESS and MAP requests use the identifier (ID) returned from the IDENTIFY request.
Mapping the data object in a data space Consider the following:
  • If the invoker is in supervisor state or holds the system key, ensure that the data space is owned by a task in the primary address space; otherwise, ensure that the data space is owned by the task that issues the MAP request.
  • If references to the data object resulted in an abend X'0C4', ensure that the data space remains created as long as the data object exists.
  • Ensure that the data space is not a DREF data space.
  • Ensure that the range of the data object to be mapped does not exceed the size of the data space.
Mapping the data object in an address space If several tasks use the same data object, ensure that each task obtains a mapping of the data in one of the following ways:
  • With a DIV macro MAP request for virtual storage owned by the task.
  • With a DIV macro MAP request for virtual storage owned by a parent task. This way is allowed when the task using the data is running in an environment authorized by the authorized program facility (APF), has a program status word (PSW) with a system-level storage protection key (0 through 7), or a PSW in supervisor state.
  • As previously mapped virtual storage belonging to the task that issued the MAP request.
Page fix for mapped virtual storage not removed after DIV macro request When a DIV macro is issued, ensure that no pages are fixed in the range of virtual storage specified on a MAP, UNMAP, SAVE, or RESET request.

Remove any page fix before the program issues any other DIV macro requests for the mapped virtual storage and before the program ends. Implicit UNMAP requests are done at program ending.

Save area for the DIV macro If a save area is missing for the DIV macro, a second invocation could fail because the storage value might have changed since the first invocation; the return address in register 14 might be incorrect.
Serializing updates to the data object Consider the following:
  • If multiple users can concurrently update the data object, use LOCVIEW=MAP on the DIV macro and serialization protocol, ENQ/DEQ for example, external to data-in-virtual.
  • If the data object is updated, ensure that the linear data set is allocated with DISP=OLD on the JCL DD statement.
SHAREOPTIONS values for the virtual storage access method (VSAM) data set If a DIV macro ACCESS request is to map the data object in a data space or address space and specifies LOCVIEW=NONE (either explicitly or by default), the recommended SHAREOPTIONS value is SHAREOPTIONS(1,3).

Otherwise, specify a SHAREOPTIONS value that accurately reflects how the data set is shared at the installation.