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

MCConfirm

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Sends a confirmation request to the remote program and waits for a reply. A status info value of 0 indicates that the remote TP has returned a positive confirmation response (the equivalent of an MCConfirmed).

Syntax

 			              I16V             I16             I32       
											MCConfirm (ResourceID, RequestToSendReceived, 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.

RequestToSendReceived

Required; 16-bit signed integer; output. This is a flag that indicates whether a RequestToSend notification has been received from the remote TP.

1 = YES

A RequestToSend notification has been received from the remote TP. The remote TP has issued the equivalent of MCReqToSend, requesting that the local TP enter Receive state and place the remote TP in Send state. See the description of the MCReqToSend intrinsic, later in this chapter.

0 = NO

No RequestToSend notification has been received.

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 MCConfirm intrinsic is used to determine whether the two sides of a conversation are synchronized. It can be used only if the conversation is allocated with a synchronization level of CONFIRM (that is, if the MCAllocate or MCGetAllocate intrinsic was called with the SyncLevel parameter set to 0). It is used to request confirmation from the remote TP and wait for a reply. A TP must be in Send state to call MCConfirm.

How confirmation is used in a conversation is up to the TP programmers. It can be used, for example, to verify that a conversation has been allocated properly and that the remote TP is ready to receive data. It can also be used after data is sent, to verify that the remote TP received everything the local TP sent.

When MCConfirm executes, the send buffer is flushed, and then a confirmation request is sent to the remote TP. The remote TP is placed in Confirm state. It may respond to the confirmation request with the equivalent of any of the intrinsics listed in Table 5-5 “Intrinsics With Confirmation Responses”. Table 5-5 “Intrinsics With Confirmation Responses” also lists the conversation state of the remote TP after issuing each intrinsic. See Chapter 4 “Conversation States” for more information on states and the intrinsics that may be called from them.

Table 5-5 Intrinsics With Confirmation Responses

Intrinsic Callable from Confirm State

State of Remote TP After Execution

MCConfirmed

Receive state

MCDeallocate (DeallocateType = ABEND)

Reset state

MCSendError

Send state

 

The conversation is suspended until the MCConfirm intrinsic completes.

Because this intrinsic causes the send buffer to be flushed, it may be called after MCAllocate to determine whether the conversation was successfully allocated on the remote side. See Chapter 6 “Buffer Management” for more information on receiving allocation errors.

Some status info values commonly returned to the MCConfirm intrinsic are described below:

0     Successful Completion.

The remote TP has responded with the equivalent of MCConfirmed.

31   Confirm not allowed.

The conversation was not allocated with a synchronization level of CONFIRM.

50   Allocation Error.

The conversation was not allocated properly by the remote TP.

60   Program Error:  Data may have been purged.

The remote TP has sent the equivalent of MCSendError.

Following is a complete list of status info values that may be returned to the MCConfirm intrinsic.

Status Info Values

 0     Successful Completion.
-1     Intrinsic called with parameter out of bounds.
-2     Invalid 'ResourceID' parameter 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