z/OS MVS Programming: Authorized Assembler Services Reference SET-WTO
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Control swapping (DONTSWAP, OKSWAP, TRANSWAP)

z/OS MVS Programming: Authorized Assembler Services Reference SET-WTO
SA23-1375-00

The SYSEVENTs DONTSWAP, OKSWAP, and TRANSWAP control swapping. The choice of mnemonic depends on the period of time for which the address space is to be non-swappable.

For a short period of time (less than one minute), use DONTSWAP to make it non-swappable and OKSWAP to make it swappable.

For an extended period of time (more than one minute), use TRANSWAP to make the address space non-swappable and OKSWAP to make it swappable.

Note: If you specify an ASID with DONTSWAP, OKSWAP, or TRANSWAP, that ASID must specify the home address space. This means, you can only control swapping in the address space in which the SYSEVENT is issued. If you specify another address space the request cannot be carried out.

The mnemonics are explained as follows:

DONTSWAP
Notifies SRM that the address space from which this SYSEVENT is issued cannot be swapped out until the system receives a matching OKSWAP for each DONTSWAP issued or until the jobstep ends.

No input parameters are required. One of the following codes will be returned in register 1, byte 3:

Hexadecimal Code Meaning
00 The request was honored.
04 The request was not honored because it was not for the current address space.
08 The request was not honored because the issuer was not authorized or the outstanding count of DONTSWAP requests had reached its maximum.
OKSWAP
Notifies SRM that the address space from which the SYSEVENT was issued can be considered for swapping.

No input parameters are required. One of the following codes will be returned in register 1, byte 3:

Hexadecimal Code Meaning
00 The request was honored.
04 The request was not honored because it was not for the current address space.
08 The request was not honored because the issuer was not authorized.
TRANSWAP
Forces a swap out. After the subsequent swap-in, frames are allocated from preferred storage and the address space is non-swappable. TRANSWAP prevents programs from allocating frames in reconfigurable storage. If the program issuing SYSEVENT depends on the transition to complete, you should ensure that register 1 contains the address of an ECB. SYSEVENT will then post this ECB when it swaps out the address space. If no dependency exists, set register 1 to 0 (zero).

One of the following codes will be returned in register 1, byte 3:

Hexadecimal Code Meaning
00 The request was honored. If an ECB was specified, your program should issue a WAIT macro specifying the same ECB.
04 The transition was previously done or the address space is permanently non-swappable. If an ECB was specified it will not be posted.

If an ECB was specified, the following POST codes may occur in the last three bytes of the ECB:

Hexadecimal Code Meaning
000000 The transition is complete.
000004 The address space became non-swappable before it could be swapped out.

Example 1

To make the current address space non-swappable for a time period of less than one minute, specify the following:
SYSEVENT DONTSWAP
        .
        .
        .
SYSEVENT OKSWAP

Example 2

To make the current address space non-swappable for an indefinite period of time, specify the following:
         SYSEVENT TRANSWAP
         ST   1,RETCODE
         CLI  TSWP_RC,0
         BNE  FAILED
         WTO  'TSWP SUCCESSFUL'
         ...
         B    DONE
FAILED   EQU  *
         WTO  'TSWP UNSUCCESSFUL (BAD RC)'
DONE     EQU  *
         ...
RETCODE  DS   0F
         DS   CL3
TSWP_RC  DS   FL1

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014