z/OS MVS Programming: Assembler Services Reference ABE-HSP
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


DELETE — Relinquish control of a load module

z/OS MVS Programming: Assembler Services Reference ABE-HSP
SA23-1369-00

Description

The DELETE macro cancels the effect of a previous LOAD macro. If DELETE cancels the only outstanding LOAD request for the module, and no other requirements exist for the module, the virtual storage occupied by the load module is released and is available for reassignment by the control program.

In the case of nonreentrant and nonreusable modules loaded multiple times, the order of processing occurs in last-loaded first-deleted order. For example, if Program A loads module LOADMODA, then calls Program B, which also loads LOADMODA, then issues a DELETE against LOADMODA, the copy of the load module to be deleted is the one associated with Program B. At this point, a copy of LOADMODA will still exist. The next DELETE request against LOADMODA will delete that copy, regardless of whether Program A or Program B issues the request.

The entry name specified in the DELETE macro must be the same as that specified in the LOAD macro that brought the load module into storage. Also, the DELETE macro must be issued by the same task that issued the LOAD macro.

Any module loaded by a task will not be removed from virtual storage until the DELETE macro is issued or end of task is reached. In addition, any module loaded by a system task will not be removed from virtual storage until a DELETE macro is issued by a system task or end of task is reached.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: Problem state and any PSW key.
Dispatchable unit mode: Task
Cross memory mode: PASN=HASN=SASN
AMODE: 24- or 31- or 64-bit
ASC mode: Primary
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks held
Control parameters: Control parameters must be in the primary address space.

Programming requirements

  • The entry name specified in the DELETE macro must be the same as that specified in the LOAD macro that brought the load module into storage.
  • The DELETE macro must be issued by the same task that issued the LOAD macro.

Restrictions

None.

Input register information

None.

Output register information

When control returns to the caller, the general purpose registers (GPRs) contain:
Register
Contents
0
Address of the name or list entry that was supplied through the EP or DE keyword.
1-14
Unchanged.
15
Return code.

Syntax

The DELETE macro is written as follows:

Syntax Description
   
   name name: Symbol. Begin name in column 1.
   
One or more blanks must precede DELETE.
   
DELETE  
   
One or more blanks must follow DELETE.
   
EP=entry name entry name: Symbol.
EPLOC=entry name addr entry name addr: RX-type address, or register (0) or (2) - (12).
DE=list entry addr list entry addr: RX-type address, or register (0) or (2) - (12).
   
   ,RELATED=value value: any valid macro keyword specification.
   

Parameters

The parameters are explained as follows:

EP=entry name
EPLOC=entry name addr
DE=list entry addr
Specifies the entry name, the address of the entry name, or the address of a 62-byte list entry for the entry name that was constructed using the BLDL macro. If you code EPLOC, pad the name to eight bytes, if necessary.
,RELATED=value
Specifies information used to self-document macros by “relating” functions or services to corresponding functions or services. The format and contents of the information specified are at the discretion of the user, and may be any valid coding values.

The RELATED parameter is available on macros that provide opposite services (for example, ATTACH/DETACH, GETMAIN/FREEMAIN, and LOAD/DELETE), and on macros that relate to previous occurrences of the same macros (for example, CHAP and ESTAE).

ABEND codes

None.

Return and reason codes

When control is returned, register 15 contains one of the following return codes:

Hexadecimal Return Code Meaning
00 Successful completion of requested function
04 Requested module was not in storage, or an attempt was made to delete a system module by a caller not authorized to do so

Example

Remove a module (PGMTOVLY) from virtual storage.
DELETE EP=PGMTOVLY

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014