Previous Page Contents Page Next Page

4 APPC Conversation Verbs

This chapter contains a description of each APPC conversation verb. The following information is provided for each verb:

Most parameters supplied to and returned by APPC are hexadecimal values. To simplify coding, these values are represented by meaningful symbolic constants defined in the header file values_c.h, which is included by the APPC header file appc_c.h. For example, the opcode parameter of the MC_SEND_DATA verb is the hexadecimal value represented by the symbolic constant AP_M_SEND_DATA .

It is important that you use the symbolic constant and not the hexadecimal value when setting values for supplied parameters, or when testing values of returned parameters. This is because different Solaris systems store these values differently in memory, so the value shown may not be in the format recognized by your system.

For Windows, the constants for supplied and returned parameter values are defined in the Windows APPC header file winappc.h.

The notation [MC_]verb refers to both the mapped and basic form of an APPC verb. For example, [MC_]SEND_DATA refers to the MC_SEND_DATA and SEND_DATA verbs.

Note

The APPC VCBs contain many parameters marked as reserved; some of these are used internally by the SNAP-IX software, and others are not used in this version but may be used in future versions. Your application must not attempt to access any of these reserved parameters; instead, it must set the entire contents of the VCB to zero to ensure that all of these parameters are zero, before it sets other parameters that are used by the verb. This ensures that SNAP-IX will not misinterpret any of its internally-used parameters, and also that your application will continue to work with future SNAP-IX versions in which these parameters may be used to provide new functions.

To set the VCB contents to zero, use memset:

memset(vcb, 0, sizeof(vcb));

The conversation verbs are described in the following order:

GET_TYPE

[MC_]ALLOCATE

[MC_]CONFIRM

[MC_]CONFIRMED

[MC_]DEALLOCATE

[MC_]FLUSH

[MC_]GET_ATTRIBUTES

[MC_]PREPARE_TO_RECEIVE

[MC_]RECEIVE_AND_POST

[MC_]RECEIVE_AND_WAIT

[MC_]RECEIVE_IMMEDIATE

[MC_]REQUEST_TO_SEND

[MC_]SEND_CONVERSATION

[MC_]SEND_DATA

[MC_]SEND_ERROR

[MC_]TEST_RTS

[MC_]TEST_RTS_AND_POST

4.1 GET_TYPE

The GET_TYPE verb returns the conversation type (basic or mapped) of a particular conversation.

With this information, the TP can decide whether to issue basic-conversation or mapped-conversation verbs.

4.1.1 VCB Structure: GET_TYPE

The definition of the VCB structure for the GET_TYPE verb is as follows:

typedef struct get_type
{
  AP_UINT16         opcode;
  unsigned char     opext;                  /* Reserved     */
  unsigned char     format;                 /* Reserved     */
  AP_UINT16         primary_rc;
  AP_UINT32         secondary_rc;
  unsigned char     tp_id[8];
  AP_UINT32         conv_id;
  unsigned char     conv_type;
} GET_TYPE; 

4.1.2 VCB Structure: GET_TYPE (Windows)

The definition of the VCB structure for the GET_TYPE verb is as follows:

typedef struct get_type
{
  unsigned short    opcode;
  unsigned char     opext;
  unsigned char     reserv2;
  unsigned short    primary_rc;
  unsigned long     secondary_rc;
  unsigned char     tp_id[8];
  unsigned long     conv_id;
  unsigned char     conv_type;
} GET_TYPE;

4.1.3 Supplied Parameters

The TP supplies the following parameters to APPC:

opcode

AP_GET_TYPE

tp_id

Identifier for the local TP.

The value of this parameter was returned by the TP_STARTED verb in the invoking TP or by RECEIVE_ALLOCATE in the invoked TP.

conv_id

Identifier for the conversation this TP is inquiring about.

The value of this parameter was returned by the [MC_]ALLOCATE verb in the invoking TP or by RECEIVE_ALLOCATE in the invoked TP.

4.1.4 Returned Parameters

After the verb executes, APPC returns parameters to indicate whether the execution was successful and, if not, to indicate the reason the execution was not successful.

Successful Execution

If the verb executes successfully, APPC returns the following parameters:

primary_rc

AP_OK

conv_type

Conversation type of the conversation identified by conv_id .

Possible values are:

AP_BASIC_CONVERSATION
AP_MAPPED_CONVERSATION

Unsuccessful Execution

If the verb does not execute successfully, APPC returns a primary return code parameter to indicate the type of error and a secondary return code parameter to provide specific details about the reason for unsuccessful execution.

Parameter Check

If the verb does not execute because of a parameter error, APPC returns the following parameters:

primary_rc

AP_PARAMETER_CHECK

secondary_rc

Possible values are:

AP_BAD_CONV_ID

The value of conv_id did not match a conversation identifier assigned by APPC.

AP_BAD_TP_ID

The value of tp_id did not match a TP identifier assigned by APPC.

AP_INVALID_FORMAT

The reserved field format was set to a nonzero value.

AP_SYNC_NOT_ALLOWED

The application issued this verb within a callback routine, using the synchronous APPC entry point. Any verb issued from a callback routine must use the asynchronous entry point.

State Check

No state check errors occur for this verb.

Other Conditions

If the verb does not execute because other conditions exist, APPC returns primary return codes (and, if applicable, secondary return codes). For information about these return codes, see Common Return Codes.

Possible return codes are:

primary_rc

AP_COMM_SUBSYSTEM_ABENDED
AP_INVALID_VERB
AP_TP_BUSY
AP_UNEXPECTED_SYSTEM_ERROR

AP_COMM_SUBSYSTEM_NOT_LOADED
AP_STACK_TOO_SMALL
AP_INVALID_VERB_SEGMENT

APPC does not return secondary return codes with these primary return codes.

4.1.5 State When Issued

The conversation can be in any state except Reset when the TP issues this verb.

4.1.6 State Change

The conversation state does not change for this verb.

Previous Page Contents Page Top of Page Next page