The UNMAP function disables a window created by MAP.
UNMAP does not result in any changes to file pages.
The state of the unmapped window pages is determined by the DISPOS operand:
If DISPOS=*UNCHNG is specified, the pages in the window will have the same contents before and after UNMAP, from the program's point of view. This means that all pages that would be read from the file if accessed prior to UNMAP must be read in from the file at the time of UNMAP, since no data can be read from the file after the window is disabled.
If DISPOS=*FRESH is specified, all pages of the window will be reset to the initial state. If accessed after UNMAP, they will appear in the window initialized with X'00'.
UNMAP only evaluates the function operands described below.
Format FCT=*UNMAP
Operation | Operands |
|
|
| |
| |
|
Operand descriptions
AREA
Specifies the starting address of the window within the address space defined by SPID (data space or program space if no data space is defined).
In the MF=L form, the starting address of the window can only be specified by a symbolic address.
= addr
4-byte (symbolic) starting address of the window.
= (r)
Register containing the starting address of the window.
DISPOS
Determines the contents (state) of the window pages on disabling the window:
Default value: | DISPOS = *FRESH |
Only a direct specification is allowed for the MF=L form.
= *UNCHNG
The pages appear as they were before the window was disabled.
This variant could have an adverse effect on performance if pages which have never been accessed since UNMAP are read from the file.
= *FRESH
All pages of the window are reset to their initial state. They appear initialized with X'00'.
If a parameter list that was used by a preceding *MAP function is used for FCT=*UNMAP, it should be noted that a value will have already been entered for the DISPOS operand. This value may need to be redefined, since DISPOS=*OBJECT is an illegal value for UNMAP.
= addr
Symbolic address of a 1-byte field containing a value for DISPOS (DIVPFRSH | DIVPUNCH
; see parameter list, "DIV function: CLOSE").
= (r)
Register containing a value for DISPOS.
FCT
Specifies the DIV function to be executed.
= *UNMAP
The UNMAP function disables a window created by MAP (for a detailed description of the function, see "DIV function: UNMAP").
Only a direct specification is allowed for the MF=L form.
= addr
Symbolic address of a 1-byte field containing the value for the UNMAP function (field DIVUNMP
, see the layout of the parameter list on "DIV function: CLOSE").
= (r)
Register containing the value for the UNMAP function.
MACID
See the description under the format FCT=*OPEN on "DIV function: OPEN".
MF
The forms of the MF operands are described in detail in the appendix ("Macro types").
PARAM
See the description under the format FCT=*OPEN on "DIV function: OPEN".
PREFIX
See the description under the format FCT=*OPEN on "DIV function: OPEN".
SPID
Specifies the address space (program or data space) in which the window is located.
SPID cannot be specified with the MF=L form.
= addr
Symbolic address of an 8-byte field containing the identification of the address space.
= (r)
Register with the address of an 8-byte field containing the identification of the address space (program or data space).