RELPAG (Release Page) Macro

The RELPAG macro causes the contents of one or more virtual storage areas to be released.

If the affected areas are in real storage when the RELPAG macro is executed, their contents are not saved but are overwritten when the associated page frames are needed to satisfy pending page frame requests.

After the RELPAG macro is issued for an area and a location in that area is referenced again during the current program execution, the related page is attached to a page frame, which contains all zeros.

The storage area is released only if it contains at least one full page. You can be sure of this only if the specified area is two times the page size minus 1 or bigger. This is explained in more detail under FCEPGOUT (Force Page Out) Macro.

Format

You can code the macro in either of the following formats:
Read syntax diagramSkip visual syntax diagramnameRELPAG ,beginaddr, endaddr
Read syntax diagramSkip visual syntax diagramnameRELPAG listname(1)

Requirements for the caller

AMODE:
24 (if SPLEVEL SET=1)

24 or 31 (if SPLEVEL SET>1)

RMODE:
24 (if SPLEVEL SET=1)

24 or ANY (if SPLEVEL SET>1)

ASC Mode:
Primary

Parameters

beginaddr
Points to the first byte of the area to be released.
endaddr
Points to the last byte of the area to be released.
listname | (1)
Is the name of a list of consecutive 8-byte entries as shown below. Register notation can also be used. The address of this parameter list and the addresses in the list are treated as 3-byte addresses if the macro is invoked in 24-bit addressing mode and as 4-byte addresses if invoked in 31-bit addressing mode.
24-bit addressing mode:
X'00' Address constant Length Minus 1
0 1 4
31-bit addressing mode:
Address constant Length Minus 1
0 4
where:
Address constant =
Address of the first byte of the area to be released.
Length =
A binary constant indicating the length of the area to be released.

The end of the list is indicated by a nonzero byte following the last entry (for 24-bit addressing mode). For 31-bit addressing mode, a nonzero value in bit 0 of the byte following the last entry indicates the end of the list.

Exceptional Conditions

  • The program is running in real mode.
  • The area is, fully or partially, outside of the virtual partition of the requesting program.
  • A page handling request is pending for the referenced pages.
  • The pages are fixed. For these pages, the RELPAG request is ignored.

Return Codes in Register 15

0
All referenced pages are released or the request is ignored, because the requesting program is running in real mode.
2
The begin address is greater than the end address, or a negative length is found.
4
The area, fully or partially, does not belong to the partition where the issuing program is running. The release request has only been executed for those pages, which belong to the partition of the issuing program.
8
At least one of the requested pages is temporarily fixed, either by the system or by a previous PFIX macro. The release request has only been executed for the unfixed pages.
16
List of areas that are to be released is not completely in the requesting program 's partition. The request is ignored.
20
Inconsistent function/option code provided in register 15; the request is ignored (this is not possible if the macro interface is used).

Any combination of the return codes 2, 4, and 8 is possible.