HPlogo LU 6.2 API Application Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 5  Intrinsic Descriptions

MCDeallocate

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Deallocates the specified conversation.

Syntax

                I16V          I16V          I32       
MCDeallocate(ResourceID, [DeallocateType], Status);

Parameters

ResourceID

Required; 16-bit signed integer by value; input. This is the unique resource ID number assigned to this conversation when it was allocated. See MCAllocate or MCGetAllocate, in this chapter, for more information.

DeallocateType

16-bit signed integer by value; input. The type of deallocation to be performed. Possible values are as follows:

0 = CONVERSATION_SYNC_LEVEL

Denotes that the conversation should be deallocated with the synchronization level specified by the SyncLevel parameter of the MCAllocate or MCGetAllocate intrinsic. The SyncLevel parameter can specify synchronization levels of CONFIRM and NONE.

If the conversation was allocated with a SyncLevel of CONFIRM, then the conversation is deallocated as if CONFIRM were given as the DeallocateType. See the discussion of CONFIRM (DeallocateType = 6).

If the conversation was allocated with a SyncLevel of NONE, then the conversation is deallocated as if FLUSH were given as the DeallocateType. See the discussion of FLUSH (DeallocateType = 1).

1 = FLUSH

Causes the local LU to empty its send buffer and release the conversation resources normally. The conversation must be in Send state to use a DeallocateType of FLUSH. A DeallocateType of FLUSH may be specified no matter what the synchronization level of the conversation is.

2 = ABEND

Allows the conversation to deallocate in any state except Deallocate state. All buffers are flushed. If the conversation is in Receive state, loss of data can occur.

5 = LOCAL

Deallocates the conversation from Deallocate state.

6 = CONFIRM

Causes an internal execution of the MCConfirm intrinsic. The remote TP must respond with positive confirmation before the conversation can be deallocated. This DeallocateType can be used only if the synchronization level of the conversation is CONFIRM. The conversation must be in Send state to use a DeallocateType of CONFIRM.

Default: 0 (CONVERSATION_SYNC_LEVEL) Note that the default cannot be used in all cases, because the conversation must be in Send state to use a DeallocateType of CONVERSATION_SYNC_LEVEL.

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 MCDeallocate intrinsic releases the resources used for a conversation. Before the TPEnded intrinsic can be called to stop the TP, MCDeallocate must be called for each conversation the TP is engaged in.

MCDeallocate with DeallocateType of ABEND ends posting. See the MCPostOnRcpt intrinsic description, later in this chapter, for more information about posting.

A TP in Deallocate state calls MCDeallocate with a DeallocateType of LOCAL. Unless there is an error, a DeallocateType of LOCAL is used when the remote TP deallocates first. Figure 5-2 “Remote TP Deallocating a Conversation” shows the remote TP deallocating a conversation. When the remote calls the equivalent of MCDeallocate, the local TP is placed in Deallocate state. From Deallocate state, the local TP deallocates its side of the conversation with a DeallocateType of LOCAL.

Figure 5-2 Remote TP Deallocating a Conversation

Remote TP Deallocating a Conversation

Status Info Values

 0     Successful Completion.
-1     Intrinsic called with parameter out of bounds.
-2     Invalid 'ResourceID' parameter specified in intrinsic call.
-8     Out of range 'DeallocateType' specified in intrinsic call.
-20    Not enough stack space for intrinsic to run.
-31    Confirm not allowed.
-40    Intrinsic called in invalid state.
-50    Allocation Error.
-51    Resource Failure:  No retry possible.
-52    Resource Failure:  Retry possible.
-60    Program Error:  Data may have been purged.
+80    Timer has expired.
-90    An internal error in Presentation Services has occurred.
-91    An internal error in the APPC subsystem has occurred.
-1002  An internal error at the mapped conversation
       level has occurred.
-1003  Required parameter missing.
-1020  Deallocate Abend.
Feedback to webmaster