RECEIVE_ALLOCATE

The RECEIVE_ALLOCATE verb is issued by the invoked TP to confirm that the invoked TP is ready to begin a conversation with the invoking TP that issued ALLOCATE or MC_ALLOCATE.

For the Microsoft® Windows® version 3.x system, it is recommended that you use WinAsyncAPPC rather than the blocking version of this call.

The following structure describes the verb control block used by the RECEIVE_ALLOCATE verb.

struct receive_allocate {
    unsigned short   opcode;
    unsigned char    opext;
    unsigned char    reserv2;
    unsigned short   primary_rc;
    unsigned long    secondary_rc;
    unsigned char    tp_name[64];
    unsigned char    tp_id[8];
    unsigned long    conv_id;
    unsigned char    sync_level;
    unsigned char    conv_type;
    unsigned char    user_id[10];
    unsigned char    lu_alias[8];
    unsigned char    plu_alias[8];
    unsigned char    mode_name[8];
    unsigned char    reserv3[2];
    unsigned long    conv_group_id;
    unsigned char    fqplu_name[17];
    unsigned char    pip_incoming;
    unsigned char    syncpoint_rqd;
    unsigned char    reserv4[3];
}; 
 

Members

opcode
Supplied parameter. Specifies the verb operation code, AP_RECEIVE_ALLOCATE.
opext
Supplied parameter. Specifies the verb operation extension. If the AP_EXTD_VCB bit is set, this indicates that the receive_allocate structure includes the syncpoint_rqd member used for Sync Point support. Otherwise the verb control block ends immediately after the fqplu_name member.
primary_rc
Returned parameter. Specifies the primary return code set by APPC at the completion of the verb. The valid return codes vary depending on the APPC verb issued. See Return Codes for valid error codes for this verb.
secondary_rc
Returned parameter. Specifies the secondary return code set by APPC at the completion of the verb. The valid return codes vary depending on the APPC verb issued. See Return Codes for valid error codes for this verb.
tp_name
Supplied parameter. Provides the name of the local TP. The value of tp_name must match the TP name configured through registry or environment variables. APPC matches the RECEIVE_ALLOCATE verb's tp_name parameter with the TP name specified by the incoming allocate, which is generated by MC_ALLOCATE or ALLOCATE in the invoking TP.

This parameter is a 64-byte EBCDIC character string and is case-sensitive. The tp_name parameter can consist of characters from the type AE EBCDIC character set:

If tp_name is fewer than 64 bytes, use EBCDIC spaces (0x40) to pad it on the right.

The SNA convention is that a service TP name can have up to four characters. The first character is a hexadecimal byte between 0x00 and 0x3F. The other characters are from the type AE EBCDIC character set.

tp_id
Returned parameter. Identifies the local TP.
conv_id
Returned parameter. Provides the conversation identifier. It identifies the conversation APPC has established between the two partner TPs.
sync_level
Returned parameter. Specifies the synchronization level of the conversation. It determines whether the TPs can request confirmation of receipt of data and confirm receipt of data.
conv_type
Returned parameter. Specifies the type of conversation chosen by the partner TP, using MC_ALLOCATE or ALLOCATE. The following are possible values:

AP_BASIC_CONVERSATION

AP_MAPPED_CONVERSATION

user_id
Returned parameter. Provides the user identifier specified by the partner TP, using MC_ALLOCATE or ALLOCATE (if the partner TP set the MC_ALLOCATE or ALLOCATE verb's security parameter to AP_PGM or AP_SAME). It is a type AE EBCDIC character string.
lu_alias
Returned parameter. Provides the alias by which the local LU is known to the local TP. It is an ASCII character string.
plu_alias
Returned parameter. Provides the alias by which the partner LU (which initiated the incoming allocate) is known to the local TP. It is an ASCII character string.
mode_name
Returned parameter. Provides the mode name specified by MC_ALLOCATE or ALLOCATE in the partner TP. It is the name of a set of networking characteristics defined during configuration. The mode_name is a type A EBCDIC character string.
conv_group_id
Conversation group identifier.
fqplu_name
This returned parameter provides the fully qualified LU name.
pip_incoming
This optional supplied and returned parameter is only applicable if the AP_EXTD_VCB bit is set in the opext parameter and Sync Point services are required.

For the supplied parameter:

AP_YES if TP does accept PIP data.

AP_NO if TP does not accept PIP data.

For the returned parameter:

AP_YES if PIP data is not available.

AP_NO if PIP data is available.

syncpoint_rqd
This optional parameter is only applicable if the AP_EXTD_VCB bit is set in the opext parameter and Sync Point services are required.

AP_YES if Sync Point is required.

AP_NO if Sync Point is not required.

Return Codes

ap_ok
Primary return code; the verb executed successfully.
ap_parameter_check
Primary return code; the verb did not execute because of a parameter error.
ap_undefined_tp_name
Secondary return code; the TP name was not configured correctly.
ap_state_check
Primary return code; the verb did not execute because it was issued in an invalid state.
ap_allocate_not_pending
Secondary return code; APPC did not find an incoming allocate (from the invoking TP) to match the value of tp_name, supplied by RECEIVE_ALLOCATE. RECEIVE_ALLOCATE waited for the incoming allocate and eventually timed out.
ap_invalid_process
Secondary return code; the process issuing RECEIVE_ALLOCATE was different from the one started by APPC.
ap_comm_subsystem_abended
Primary return code; indicates one of the following conditions:

The system administrator should examine the error log to determine the reason for the ABEND.

ap_conv_busy
Primary return code; there can only be one outstanding conversation verb at a time on any conversation.
ap_thread_blocking
Primary return code; the calling thread is already in a blocking call.
ap_comm_subsystem_not_loaded
Primary return code; a required component could not be loaded or terminated while processing the verb. Thus, communication could not take place. Contact the system administrator for corrective action.
ap_invalid_verb_segment
Primary return code; the VCB extended beyond the end of the data segment.
ap_stack_too_small
Primary return code; the stack size of the application is too small to execute the verb. Increase the stack size of your application.
ap_unexpected_dos_error
Primary return code; the operating system has returned an error to APPC while processing an APPC call from the local TP. The operating system return code is returned through the secondary_rc. It appears in Intel byte-swapped order. If the problem persists, consult the system administrator.

Remarks

This must be the first APPC verb issued by the invoked TP. The initial state is RESET. If the verb executes successfully (primary_rc is ap_ok), the state changes to RECEIVE.

In response to this verb, APPC establishes a conversation between the two TPs and generates a TP identifier for the invoked TP and a conversation identifier. These identifiers are required parameters for subsequent APPC verbs.

If the invoked TP issues RECEIVE_ALLOCATE and a corresponding incoming allocate (resulting from MC_ALLOCATE or ALLOCATE issued by the invoking TP) is not present, the invoked TP waits until the incoming allocate arrives or the verb times out. The time-out value is set by the system administrator.