General
Application area: | Linking and loading; see "Linking and loading" |
Macro type: | Type S, MF format 2: standard/C/D/L/E/M form; see "S-type macros" |
See also the “BLSSERV” manual [4 (Related publications)] for information on the dynamic binder loader DBL.
Macro description
The DSHARE macro unloads a single shareable program from a common memory pool. This program was loaded previously by means of the ASHARE macro. The calling task must be connected to the common memory pool containing the shareable program involved. When the last participant is disconnected from a memory pool, all the shareable programs in this memory pool are unloaded and the memory pool is deleted (see the DISMP macro).
Macro format and description of operands
DSHARE |
{ PROGRAM=name / PROG@={addr / (r)} } [, { PGMVERS={*STD / version} / PGMVER@= {addr / (r)} }] ,MF=S / C / D / E / L / M [,PARAM=addr / (r)] ,PREFIX=P / p ,MACID=BDS / macid |
PROGRAM=name
Identifies the program that was loaded into the common memory pool using the ASHARE macro. The specified name must be unique and may be up to 32 characters long.
PROG@=
Specifies the address of a field containing the program name. May be specified only in conjunction with MF=M.
addr
Address of an auxiliary field which contains the field address searched for.
(r)
r = register containing the field address searched for.
PGMVERS=
Specifies the program version.
*STD
The program version is not taken into account during unloading, i.e. the first program found with the specified name is unloaded.
version
The version specified may be up to 24 characters long. If this program version does not exist in the common memory pool, nothing is unloaded and the corresponding return code is output.
PGMVER@=
Specifies the address of a field containing the program version. May be specified only if MF=M.
addr
Address of an auxiliary field which contains the field address searched for.
(r)
r = register containing the field address searched for.
MF=
For a general description of the MF operand, its operand values and any of the specified operands PARAM, PREFIX and MACID, see section “S-type macros”. The valid MF values are given at the start of the macro description under “Macro type” and are included in the macro format.
A PREFIX can be specified in the C form, D form or M form of the macro, and additionally a MACID in the C form or M form (see section “S-type macros”).
Notes on the macro call
Before calling DSHARE, the user must be connected to the memory pool.
Only the DSHARE macro can be used to unload shared code from memory pools. The UNBIND macro may not be used for this purpose.
It is the user's responsibility to check whether the program to be unloaded is still being executed by other users.
Return information and error flags
Standard header:
+---------------+ | | | | | |c|c|b|b|a|a|a|a| +---------------+
A return code relating to the execution of the DSHARE macro is transferred in the standard header (cc=Subcode2, bb=Subcode1, aaaa=Maincode):
X'cc' | X'bb' | X'aaaa' | Meaning |
X'00' | X'00' | X'0000' | The macro was executed normally. |
X'00' | X'01' | X'0001' | The program name is missing. |
X'00' | X'01' | X'0010' | The program was not found in any memory pool accessible to the user. |
X'00' | X'01' | X'0011' | The program was found but the user is not connected to the memory |
X'00' | X'20' | X'0100' | System error. |
X'00' | X'20' | X'0101' | DBL error during unloading. |
X'00' | X'20' | X'0103' | DBL-LOCK-MANAGER error during the DSHARE macro processing |
X'00' | X'01' | X'FFFF' | The function is no longer or not yet supported. |
X'00' | X'03' | X'FFFF' | The interface version is not supported. |
Other return codes which, in accordance with conventions, apply to all macros are given in the table “Standard return codes” (Standard header).