The PURGE macro is used to halt or finish I/O requests.
Refer to “General-Use Mapping Macros” in z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN for
information about using the 31-bit interface provided by the PURGE
function.
The format of the PURGE macro is:
>>-+-------+--PURGE--parameter_list_address--------------------><
'-label-'
- parameter_list_address—RX-type address,
(2-12) or (1)
- Address of a parameter list, 12 or 16 bytes long, that you have
built on a word boundary in storage. The parameter list address can
be specified as an RX-type address or in registers 2 through 12, or
1. The name of the mapping macro is IECDPPL.
The format and contents of the parameter list are as follows:
- Byte
- Contents
- 0
- A byte that specifies the actions of the purge routines. The bit
settings and their meanings are:
- 1... ....
- Purge I/O requests to a single data set. The setting of this
bit only takes effect if bit 2 of byte 12 is 0 and bit 6 of byte 0
is 0.
- 0... ....
- Either purge I/O requests associated with a TCB or address space,
or purge I/O requests to more than one data set. If bit 2 of byte
12 is 1, then the request is to purge I/O associated with an address
space. If bit 2 of byte 12 is 0 and bit 6 of byte 0 is 1, then the
request is to purge I/O associated with a TCB. If bit 2 of byte 12
is 0 and bit 6 of byte 0 is 0, then the request is to purge I/O to
more than one data set.
- .1.. ....
- Post ECBs associated with purged I/O requests.
- ..1. ....
- Halt I/O-request processing. (Quiesce I/O-request processing,
if 0.)
- ...1 ....
- Purge related requests. (Only valid if a data-set purge is requested.)
- .... 0...
- Reserved—must be zero.
- .... .1..
- Do not purge the TCB request-block chain of asynchronously scheduled
processing.
- .... ..1.
- Purge I/O requests associated with a TCB. The setting of this
bit will only take affect if bit 2 of byte 12 is 0.
- .... ...1
- This is a 16-byte parameter list. Additional purge options are
specified in bytes 12 to 15. (If this bit is off, the list is 12 bytes
long, and the purge routines do not put a return code in byte 4 of
this list or in register 15.)
- 1,2,3
- The address of a DEB when purging I/O requests to a single data
set. The address of the first DEB in a chain of DEBs when purging
I/O requests to more than one data set. (The next-to-the-last word
of each DEB must point to the next DEB in the chain; the second word
of the last DEB must contain zeros.)
- 4
- A byte of zeros. (If bit 7 of byte 0 is on, the purge routines
will put a code in byte: X'7F' when the purge operation is
successful; X'40' when it is not successful. If bit 7 of
byte 0 is off, then X'7F' appears in this byte.)
- 5,6,7
- If you turned on bit 6 of byte 0, the address of the TCB associated
with the I/O requests you want purged. Will be zeros if the TCB is
the one you are running under.
- 8
- Value of X'00' or X'02' means that EXCP is the
owner.
- 9,10,11
- The address of a word in storage or the address of the
DEBUSPRG field (that is X'11' bytes more than the DEB address
in this parameter list). At the address you specify, the purge routines
store a pointer to the purged I/O restore list, that in turn contains
a pointer to the first IOB in the chain of IOBs. The location of the
pointer and format of the chain are shown in Figure 1.
Note: This field is only relevant
for quiesce options.
- 12
- A byte that allows you to specify additional purge options. The
bit settings and their meanings are:
Note: The following applies
only if bit 7 of byte 0 is set to 1.
- ..1. ....
- Purge I/O requests associated with an address space. (Your program
must be in supervisor state.) The setting of this bit will take affect
regardless of the setting of bit 6 of byte 0 and bit 0 of byte 0.
- ...1 ....
- If this is a data-set purge, check the validity of all the DEBs
associated with the purge operation. Validate this parameter list,
whatever the type of purge operation, by ensuring that there are no
inconsistencies in the selection of purge options. (If your program
is in problem state, these actions are taken regardless of the bit
setting.)
- .... 1...
- Ensure that I/O requests will be reprocessed (restored) under
their original TCB. (If zero, and bit 7 of byte 0 is on, the I/O requests
are reprocessed under the TCB of the program making the restore request.)
- .... .0..
- Must be zero.
- 13
- A byte of zeros.
- 14,15
- If bit 2 of byte 12 is on, the 2-byte ID of the address space
associated with the I/O requests you want purged.
Control is returned to your program at the instruction following
the PURGE macro instruction.