The XCTL macro passes control to a specified entry name in a load module; the entry name must be a member name, an alias in a directory of a partitioned data set, or have been specified in an IDENTIFY macro. The system brings the load module (called the target module) containing the entry name into storage if a usable copy is not already available. Control passes from the program that issues the XCTL or XCTLX (called the XCTL issuer) to the target module; control does not return to the XCTL issuer. Rather, control returns to the program that caused the XCTL issuer to run. The use count for the XCTL issuer's load module is decremented by 1. If the use count becomes zero, the system deletes the XCTLX issuer's module and reassigns that storage.
The data passed to the target module must not reside within the XCTL issuer's module; if the system deletes the XCTL issuer's module, any data in that module is not available. For more help in understanding passing parameters with XCTL and XCTLX, see Examples of passing data to the target module.
The target module gets control in the residency mode and addressing mode established by the link-edit. If XCTL=YES was specified on the ESTAE or ESTAEX macro that set up recovery for the XCTL issuer, then the ESTAE-type recovery routine covers the target module also.
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-bit or 31-bit for XCTL; 24- or 31- or 64-bit for XCTLX |
ASC mode: | Primary or access register |
Interrupt status: | Enabled for I/O and external interrupts |
Locks: | No locks held |
Control parameters: | Must reside in the primary address space |
User parameters: | Must reside in the primary address space |
The standard form of the XCTL macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede XCTL. |
XCTL | |
␢ | One or more blanks must follow XCTL. |
(reg1), |
reg1 and reg2: Decimal digits in the order 2 through 12. |
EP=entry name | entry name: Symbol. |
EPLOC=entry name addr | entry name addr: A-type address or register (2) - (12). |
DE=list entry addr | list entry addr: A-type address, or register (2) - (12). |
,DCB=dcb addr | dcb addr: A-type address, or register (2) - (12). |
,LSEARCH=NO | Default: LSEARCH=NO |
,LSEARCH=YES | |
The parameters are explained as follows:
Instead, the system uses the BLDL macro to construct a new list entry containing the DE information.
Note: When you use the DE parameter with the XCTL macro, DE specifies the address of a list that was created by a BLDL macro. BLDL and XCTL must be issued from the same task; otherwise, the system might terminate the program with an abend code of 106 and a return code of 15. Therefore, do not issue an ATTACH or a DETACH macro between issuances of the BLDL and the XCTL macros.
If the DCB parameter is omitted or if DCB=0 is specified when the XCTL macro is issued by the job step task, the data sets referred to by either the STEPLIB or JOBLIB DD statement are first searched for the entry name. If the entry name is not found, the link library is searched.
If the DCB parameter is omitted or if DCB=0 is specified when the XCTL macro is issued by a subtask, the data sets associated with one or more data control blocks referred to by the TASKLIB operand of previous ATTACH macros in the subtasking chain are first searched for the entry point name. If the entry point name is not found, the search is continued as if the XCTL had been issued by the job step task.
None.
XCTL (2,12),EPLOC=XCTLEP