Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Defining windows

The MAP function is used to define a window, i.e. a region in an address area (program or data space) that is assigned to a file area or an entire file.
At the time of calling OPEN, users can specify whether a given page should be read into a window only when it is first accessed, or as soon as MAP is called. The individual operands of the MAP function can be used to specify the type (program or data space), position and size of the virtual address area.

The FCT=*MAP and FCT=*UNMAP functions of the DIV macro are used to open and close windows for a program call. SPID=0 must always be specified for the SPID operand (ID of the data space).

The following rules must be observed:

  • One page of an address space can be assigned to one window only.

  • Within an OPEN, a file page can be assigned to one window only.

  • A file page can be assigned to more than one window only if these windows belong to different OPEN operations.

List of the most important macro operands for defining windows

Operand

Operand values

Meaning

FCT

*MAP

Defines a window

SPID


SPID specifies the ID of the data space in which the window is to be created.

AREA


AREA specifies the starting address of the window in a virtual address space (aligned on a 4KB page boundary). A page of an address space must be assigned to one window only.

OFFSET
SPAN


The OFFSET and SPAN operands specify the (beginning and length) of the file area in units of 4KB pages and thus define the size of the window. The MAP function can be used to extend the physical length of a file.

DISPOS


DISPOS can be used to define the contents of the window:
Note
After a call to the REQM or DSPSRV macro, the specified virtual address space is initialized with X' 00' (see the “Introductory Guide to DMS” [1])

*OBJECT

A page of the file will be read into the window when the page is first accessed.

*UNCHNG

At the time of the first access, a window page retains its contents (i.e. the contents of the virtual address space) and is not replaced by the corresponding file page).