LU 6.2 API Application Programmer's Reference Guide (30294-90008)

72 Chapter5
Intrinsic Descriptions
TPEnded
TPEnded
Terminates access to LU 6.2 API and releases resources.
Syntax
I16V I32
TPEnded(TPID, Status);
Parameters
TPID
Required; 16-bit signed integer by value; input. This
number is assigned to the specific instance of the TP
during the execution of the TPStarted intrinsic. (More
than one instance of the same TP may be executing at
once, and the
TPID
uniquely identifies a single instance
of a TP.)
Status
Required; 32-bit signed integer; output. Indicates the
result of intrinsic execution. See the “Status
Parameter” section, earlier in this chapter, for more
information.
Description
The TPEnded intrinsic is used to release all resources allocated for the
execution of this TP. If the TPStarted intrinsic has been called within a
TP, the TPEnded intrinsic should be called before the TP finishes
executing.
If a TP terminates abnormally, and TPEnded cannot execute
successfully, LU 6.2 API will attempt to release the resources allocated
for the TP.
NOTE
Always call TPEnded to end your TPs. If all conversations have been
deallocated, the TP is still executing, and TPEnded has not been called,
the node manager cannot bring down the APPC subsystem without first
aborting the TP. Call TPEnded as soon as all conversations have been
deallocated.