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

MCPrepToRcv

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Changes the conversation state of the local TP from Send to Receive, and changes the conversation state of the remote TP from Receive to Send.

Syntax

			               I16V      I32         I16V         I16V
		MCPrepToRcv(ResourceID, Status, [PrepToRcvType], [Locks]);

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.

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.

PrepToRcvType

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

0 = CONVERSATION_SYNC_LEVEL

Denotes that the MCPrepToRcv intrinsic will be executed 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 MCPrepToRcv is executed as if CONFIRM were given as the MCPrepToRcvType. See the discussion of CONFIRM MCPrepToRcvType = 2).

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

1 = FLUSH

Causes the local LU to empty its send buffer and the local TP to enter Receive state.

6 = CONFIRM

Causes the local LU to flush its send buffer and immediately send a confirmation request to the remote TP. The remote TP is then placed in Confirm Send state and must respond with positive confirmation before it can enter Send state. If the MCPrepToRcv intrinsic does not execute successfully, the state of the local TP is determined by the value returned in the Status parameter, as follows:

status info value

state of local TP

-50 Allocation Error

Deallocate state

-51 Resource Failure — No Retry

Deallocate state

-52 Resource Failure — Retry

Deallocate state

-60 Program Error

Receive state

+80 Timer Has Expired

Receive state

-1020 Deallocate Abend

Deallocate state

Default: 0 (CONVERSATION_SYNC_LEVEL)

Locks

16-bit signed integer by value; input. This parameter specifies when control is to be returned to the local TP after it calls MCPrepToRcv with a PrepToRcvType of CONFIRM (or CONVERSATION_SYNC_TYPE, if the conversation has a SyncLevel of CONFIRM). If MCPrepToRcv is called with a PrepToRcvType of FLUSH, the Locks parameter has no meaning and is ignored. Possible values for this parameter are as follows:

0 = SHORT

Control will be returned to the local TP as soon as the remote TP sends back an appropriate reply. The equivalent of any of the following LU 6.2 API intrinsics will generate an appropriate reply:

MCConfirmed
MCDeallocate (DeallocateType = ABEND)
MCSendError

1 = LONG

Control will not be returned to the local TP until information, such as data, is received from the remote TP following a positive confirmation response.

Default: 0 (SHORT)

Description

The MCPrepToRcv intrinsic flushes the local TP's send buffer, changes the conversation state of the local TP from Send to Receive, and changes the state of the remote TP from Receive to Send. No data can be received through this intrinsic. To receive data, you must call either MCRcvAndWait or MCRcvNoWait.

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.
-26   Out of range 'PrepToRcvType' parameter specified in intrinsic call.
-27   Out of range 'Locks' parameter specified in intrinsic call.
-40   Intrinsic called in invalid state.
-50   Allocation Error.
-51   Resource Failure:  Retry possible.
-52   Resource Failure:  No retry possible.
-56   Program Error: No data truncation has occurred.
-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.
-1105 Internal Error: Conversation deallocated.
Feedback to webmaster