Description

The LXFRE macro frees one or more linkage indexes. You cannot free a linkage index that was reserved with the SYSTEM option. (See the LXRES macro). Before issuing the LXFRE macro, disconnect all entry tables associated with the linkage index, unless you specify FORCE=YES. If you do not disconnect the entry tables and do not specify FORCE=YES, linkage indexes are not freed and the routine is abnormally terminated.

Related macro

LXRES

Environment

These are the requirements for the caller:

Environmental factor Requirement
Minimum authorization: Supervisor state or PKM 0-7
Dispatchable unit mode: Task or SRB
Cross memory mode: Any PASN, any HASN, any SASN
AMODE: 24- or 31-bit
ASC mode: Primary
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks held
Control parameters: Must be in primary address space
   

Programming requirements

None.

Restrictions

None.

Input register information

The LXFRE macro is sensitive to the SYSSTATE macro with the OSREL=ZOSV1R6 parameter
  • If the caller has issued the SYSSTATE macro with the OSREL=ZOSV1R6 parameter (Version 1 Release 6 of z/OS® or later) before issuing the LXFRE macro, the caller does not have to place any information into any general purpose register (GPR) unless using it in register notation for a particular parameter, or using it as a base register.
  • Otherwise, the caller must ensure that the following general purpose register contains the specified information:
    Register
    Contents
    13
    The address of an 18-word save area

Output register information

After the caller issues the macro, the macro might use some registers as work registers or might change the contents of some registers. When the macro returns control to the caller, the contents of these registers are not the same as they were before the macro was issued. Therefore, if the caller depends on these registers containing the same value before and after issuing the macro, the caller must save these registers before issuing the macro and restore them after the system returns control.

When control returns to the caller, the general purpose registers (GPRs) contain:
Register
Contents
0-1
Used as work registers by the macro
2-13
Unchanged
14
Used as a work register by the macro
15
Return code

Performance implications

None.

Syntax

The standard form of the LXFRE macro is written as follows:

Syntax Description
   
   name name: Symbol. Begin name in column 1.
   
One or more blanks must precede LXFRE.
   
LXFRE  
   
One or more blanks must follow LXFRE.
   
LXLIST=lx list addr lx list addr: RX-type address or register (2) - (12).
ELXLIST=elx list addr elx list addr: RX-type address or register (2) - (12).
   
   ,FORCE=NO Default: FORCE=NO
   ,FORCE=YES  
   
   ,RELATED=value value: Any valid macro keyword specification.
   

Parameters

The parameters are explained as follows:

LXLIST=lx list addr
ELXLIST=elx list addr
lx list addr specifies the address of a variable length list of fullword entries. The first word in the list must contain the number (1 to 32) of LXs to be freed. Each entry following the first must contain a linkage index value specified in the form returned by the LXRES macro.

elx list addr specifies the address of an area that contains extended linkage index (LX) values. The first word in the list must contain the number (1 to 32) of LXs values to be freed. Each subsequent eight bytes contains an extended linkage index value in the form returned by the LXRES macro: a 4-byte sequence number followed by an LX value. If the sequence number in one of the eight-byte sections is incorrect, the system issues abend X'052' with reason code X'0216'.

,FORCE=NO
,FORCE=YES
Specifies whether (YES) or not (NO) the linkage index is to be freed even if entry tables are currently connected to it. Any connected entry tables are disconnected before the linkage index is freed. FORCE=NO is the default.
,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 can be any valid coding values.

ABEND codes

052
053

See z/OS MVS System Codes for an explanation and programmer responses for this code.

Return codes

When LXFRE macro returns control to your program, GPR 15 contains a hexadecimal return code and GPR 0 contains a hexadecimal reason code.

Table 1. Return Codes for the LXFRE Macro
Return Code Meaning and Action
00 Meaning: The specified linkage indexes were freed. No entry tables were connected.

Action: None.

04 Meaning: The specified linkage indexes were freed. Entry tables were connected, but FORCE was specified and was successfully executed.

Action: None.

08 Meaning: Some of the specified linkage indexes were freed. Entry tables were connected. FORCE was specified but one or more of the necessary disconnects failed.

Action: None required.

Examples

For examples of the use of this and other cross memory macros, see the chapter on cross memory communication in z/OS MVS Programming: Extended Addressability Guide.