── DELINKLIBRARY ── ( ─┬─<library identifier>─────────────────────┬────►
├─<connection library instance designator>─┤
├─<this intrinsic>─────────────────────────┤
└─<connection parameter>───────────────────┘
►─┬──────────────────────────────┬─ ) ─────────────────────────────────┤
│ ┌◄─/1\─────────────────────┐ │
└─┴─┬─/1\─ , ─┬─ WAIT ─────┬─┴─┘
│ └─ DONTWAIT ─┤
└─/1\─ , ─┬─ ORDERLY ──┤
└─ ABORT ────┘The DELINKLIBRARY function unlinks the program from the library program specified by the library identifier. The DELINKLIBRARY function affects only the linkage between the program and the indicated library; other programs using the library program are not affected.
The WAIT/DONTWAIT and the ORDERLY/ABORT options are used for connection libraries. The ORDERLY/ABORT option indicates what to do if there are still stacks calling through a connection library. The ORDERLY option indicates that the delinkage is delayed until the identified stacks no longer have a procedure activation from the connection library in their stack. No new calls are allowed through the library while it is delinking. The ABORT option indicates that the identified stacks should be discontinued (DSed).
The WAIT/DONTWAIT option indicates whether to wait for the delink action to finish if the first option is ORDERLY. If the value is WAIT, the connection library is completely delinked when the function returns. If the value is DONTWAIT, the delinkage might not be finished and the program has to check the STATE attribute to determine when it is delinked.
You can direct a program to wait for other stacks to stop using the connection library by having the program first call DELINKLIBRARY with the DONTWAIT and ORDERLY options. Then, after the time has passed, the program can check to see if the library is actually delinked. If the program is not delinked, then DELINKLIBRARY can be called again with the WAIT and ABORT options set.
When a connection library is block exited, DELINKLIBRARY is called with the options set to WAIT, ABORT.
This function returns an integer value that indicates success or failure and the reason for failure. The values returned by the function can be interpreted as follows:
|
Value |
Meaning |
|
2 |
The connection is already being delinked. |
|
1 |
The library has been unlinked from the program. |
|
0 |
The library was not linked to the program. |
|
-1 |
The library structure could not be accessed; a system fault has occurred. |
|
-2 |
The library designator is not a server library or a connection library. |
|
-3 |
The DONTWAIT or ORDERLY option was specified for a Server Library. |
|
-4 |
The delinkage was not completed because the process was terminated. |
|
-5 |
DELINKLIBRARY was called from inside a CHANGE or APPROVAL procedure, or from a procedure called from a CHANGE or APPROVAL procedure. |
|
-6 |
An implementation error has occurred in the MCP; report this problem to Unisys support. Make sure to include any system dumps that might have been taken. |

