Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@UNLOAD - Unload a module

&pagelevel(3)&pagelevel

The @UNLOAD statement is used to unload load units that were loaded with @USE or @RUN. At the same time, application routines that were assigned to the unloaded unit are deactivated and their user statement symbols are set to invalid.

Operation

Operands

F mode, L mode

@UNLOAD

{ UNIT=entry

 | MODULE=entry

 | (name) }

UNIT=entry

The load unit (UNIT) with the name entry is to be completely unloaded.
When loading external statement routines with @USE or user routines with
@RUN, EDT informs the dynamic binder loader of the name of the specified
module or the entry point (ENTRY) in the form of a UNIT name. When this
name is specified in @UNLOAD then the complete load unit including any
dynamically autolinked modules is unloaded.

MODULE=entry

The module with the name entry is to be unloaded. In contrast to the
specification of UNIT, only the specified module is unloaded.

name

Name of the module that is to be unloaded. This format is now only
supported for reasons of compatibility.

If the @UNLOAD statement results in a load unit or module being unloaded, EDT then makes the necessary changes in the list of declared statement routines. Here, a statement routine is only identified by means of the string specified in entry or name without taking account of the load structure. All statement routines with the specified name are deactivated and their user statement symbols are set to invalid. Statement routines defined using @USE ...,ENTRY=* are ignored during this operation, i.e. the corresponding user statement symbol remains valid and the unloaded load unit is loaded again, if necessary, with the corresponding entry point the next time it is called.

The @UNLOAD statement is one of the EDT statements with security implications (see also section “Access protection”). The statement is rejected in uninterruptible system procedures in interactive mode and on input from a file (read with RDATA from SYSDTA not equal to SYSCMD, execution of a start procedure).

The attempt to unload modules that have been dynamically loaded internally by EDT is rejected with the message EDT1907.

The same message is output if the module cannot be unloaded for other reasons. The possible causes for this include an incorrect module name, the specification of a module that has been loaded as shareable or the specification of a CSECT or ENTRY name that did not result in a load operation in the @USE or @RUN statement.

Note

Names of up to 32 characters in length are permitted in the entry specification and the name is case-sensitive. Only 8 characters are permitted for name and any lowercase characters that are entered are converted into uppercase.

Caution

On @UNLOAD, EDT only deletes the user statement symbol to which the specified load unit or specified module were assigned directly.
User statement symbols which refer to other entry points (ENTRY) in the load unit are retained and subsequently point to invalid addresses. It is the user's own responsibility to ensure that such user statement symbols are no longer used after the unload.