[MC_]SEND_DATA

The [MC_]SEND_DATA verb puts data in the local LU's send buffer for transmission to the partner transaction program.

VCB Structure

typedef struct send_data
{
 unsigned short    opcode;                /* verb operation code      */
 unsigned char     opext;                 /* verb extension code      */
 unsigned char     format;                /* format                   */
 unsigned short    primary_rc;            /* primary return code      */
 unsigned long     secondary_rc;          /* secondary return code    */
 unsigned char     tp_id[8];              /* TP identifier            */
 unsigned long     conv_id;               /* conversation identifier  */
 unsigned char     rts_rcvd;              /* request to send received */
 unsigned char     expd_data_rcvd;        /* expedited data received  */
 unsigned short    dlen;                  /* data length              */
 unsigned char    *dptr;                  /* pointer to data          */
 unsigned char     type;                  /* send data type           */
 unsigned char     reserv4;               /* reserved                 */
} SEND_DATA;
typedef struct mc_send_data
{
 unsigned short    opcode;             /* verb operation code      */
 unsigned char     opext;              /* verb extension code      */
 unsigned char     format;             /* format                   */
 unsigned short    primary_rc;         /* primary return code      */
 unsigned long     secondary_rc;       /* secondary return code    */
 unsigned char     tp_id[8];           /* TP identifier            */
 unsigned long     conv_id;            /* conversation identifier  */
 unsigned char     rts_rcvd;           /* request to send received */
#ifdef WINAPPC_FORMAT_1
 unsigned char     expd_data_rcvd;     /* expedited data received  */
#else
 unsigned char     data_type;          /* data type received       */
#endif
 unsigned short    dlen;               /* data length              */
 unsigned char    *dptr;               /* pointer to data          */
 unsigned char     type;               /* send data type           */
#ifdef WINAPPC_FORMAT_1
 unsigned char     data_type;          /* data type received       */
#else
 unsigned char     reserv4;            /* reserved                 */
#endif
} MC_SEND_DATA;

Supplied Parameters

The transaction program supplies the following parameters to Personal Communications:
opcode
AP_B_SEND_DATA
Displays a basic verb icon.

AP_M_SEND_DATA

Displays a mapped verb icon.

opext
AP_BASIC_CONVERSATION or AP_MAPPED_CONVERSATION. For nonblocking operation, this flag can be ORed together with AP_NON_BLOCKING.

On full-duplex conversations, this flag must be ORed together with AP_FULL_DUPLEX_CONVERSATION.

format
Format of the VCB. Set this to one to get the format listed above.
tp_id
Identifier for the local transaction program.

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

conv_id
Conversation identifier.

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

dlen
Number of bytes of data to be put in the local LU's send buffer.

Range: 0–65535

dptr
Address of the buffer containing the data to be put in the local LU's send buffer. The application can append data to the end of the VCB, in which case dptr must be set to NULL.
type
Specifies whether to perform the function of another verb in addition to SEND_DATA.

AP_NONE
AP_SEND_DATA_CONFIRM
AP_SEND_DATA_FLUSH
AP_SEND_DATA_P_TO_R_FLUSH
AP_SEND_DATA_P_TO_R_SYNC_LEVEL
AP_SEND_DATA_P_TO_R_CONFIRM
AP_SEND_DATA_DEALLOC_FLUSH
AP_SEND_DATA_DEALLOC_SYNC_LEVE
AP_SEND_DATA_DEALLOC_CONFIRM
AP_SEND_DATA_DEALLOC_ABEND

Returned Parameters

If the verb executes successfully, Personal Communications returns the following parameters:
Note: For performance reasons, the SNA API client can return a successful return code on the [MC_]SEND_DATA verb without forwarding it to the server. When a subsequent [MC_]SEND_DATA verb is issued, the [MC_]SEND_DATA is forwarded to the server for processing.

If there is a SEND_DATA error return code, it is returned on the subsequent verb.

primary_rc
AP_OK
rts_rcvd
Request-to-send-received indicator.
  • AP_YES
  • AP_NO
expd_data_rcvd
Expedited-data-received indicator. This indication continues to be set to AP_YES until a RECEIVE_EXPEDITED_DATA is issued.
  • AP_YES
  • AP_NO
If the verb does not execute due to a parameter error, Personal Communications returns the following parameters:
primary_rc
AP_PARAMETER_CHECK
opext
AP_OPERATION_INCOMPLETE_FLAG
If the verb does not execute because of a parameter error, Personal Communications returns the following parameters:
primary_rc
AP_PARAMETER_CHECK
secondary_rc

AP_BAD_CONV_ID
AP_BAD_TP_ID

AP_BAD_LL
Displays a basic verb icon.

AP_SEND_DATA_INVALID_TYPE
AP_SEND_DATA_CONFIRM_SYNC_NONE
AP_SEND_TYPE_INVALID_FOR_FDX

If the conversation is in the wrong state when the transaction program issues this verb, Personal Communications returns the following parameters:
primary_rc
AP_STATE_CHECK
secondary_rc
AP_SEND_DATA_NOT_SEND_STATE

AP_SEND_DATA_NOT_LL_BDY

Displays a basic verb icon.

The conditions generating the following possible primary return codes (primary_rc) and indented secondary return codes (secondary_rc) are described in APPC Common Return Codes.

AP_ALLOCATION_ERROR

  • AP_SECURITY_NOT_VALID
  • AP_TRANS_PGM_NOT_AVAIL_RETRY
  • AP_TRANS_PGM_NOT_AVAIL_NO_RETRY
  • AP_TP_NAME_NOT_RECOGNIZED
  • AP_PIP_NOT_ALLOWED
  • AP_PIP_NOT_SPECIFIED_CORRECTLY
  • AP_CONVERSATION_TYPE_MISMATCH
  • AP_SYNC_LEVEL_NOT_SUPPORTED

AP_CONV_FAILURE_NO_RETRY
AP_CONV_FAILURE_RETRY

AP_DEALLOC_ABEND

Displays a mapped verb icon.

AP_DEALLOC_ABEND_PROG

Displays a basic verb icon.

AP_DEALLOC_ABEND_SVC

Displays a basic verb icon.

AP_DEALLOC_ABEND_TIMER

Displays a basic verb icon.

AP_PROG_ERROR_PURGING

AP_SVC_ERROR_PURGING

Displays a basic verb icon.

AP_TP_BUSY
AP_CONVERSATION_TYPE_MIXED

AP_DUPLEX_TYPE_MIXED

Displays a basic verb icon.

AP_UNEXPECTED_SYSTEM_ERROR
AP_CANCELLED
AP_ERROR_INDICATION

  • AP_ALLOCATION_ERROR_PENDING
  • AP_DEALLOC_ABEND_PROG_PENDING
  • AP_DEALLOC_ABEND_SVC_PENDING
  • AP_DEALLOC_ABEND_TIMER_PENDING
  • AP_UNKNOWN_ERROR_TYPE_PENDING