[MC_]SEND_ERROR

The [MC_]SEND_ERROR verb notifies the partner transaction program that the local transaction program has encountered an application-level error.

VCB Structure

typedef struct send_error
{
 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      err_type;             /* error type               */
 unsigned char      err_dir;              /* error direction          */
 unsigned char      expd_data_rcvd;       /* expedited data received  */
 unsigned short     log_dlen;             /* log data length          */
 unsigned char     *log_dptr;             /* pointer to log data      */
} SEND_ERROR;
typedef struct mc_send_error
{
 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    err_type;             /* error type               */
 unsigned char    err_dir;              /* error direction          */
 unsigned char    expd_data_rcvd;       /* expedited data received  */
 unsigned char    reserv5[2];           /* reserved                 */
 unsigned char    reserv6[4];           /* reserved                 */
} MC_SEND_ERROR;

Supplied Parameters

The transaction program supplies the following parameters to Personal Communications:
opcode
AP_B_SEND_ERROR
Displays a basic verb icon.
AP_M_SEND_ERROR
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
Identifies the format of the VCB. Set this field to zero to specify the version of the VCB 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.

err_type
Displays a basic verb icon.

 

Indicates the type of the error being reported: application program or service program.

AP_PROG
AP_SVC

err_dir
Indicates whether the error being reported is in the data received from the partner transaction program, or in the data the local transaction program was about to send.
This parameter is used only when the SEND_ERROR verb is being issued in SEND_PENDING state.
  • AP_RCV_DIR_ERROR
  • AP_SEND_DIR_ERROR
log_dlen
Displays a basic verb icon.

 

Number of bytes of data to be sent to the error log file.

Range: 0–32767

The application can append data to the end of the VCB, in which case this field will be greater than zero and log_dptr must be set to NULL. (A length of zero indicates that there is no error log data.)

log_dptr
Displays a basic verb icon.

 

Address of data buffer containing error information. The application can append data to the end of the VCB, in which case log_dptr must be set to NULL.

This data is sent to the local error log and to the partner LU. This parameter is used by the SEND_ERROR verb if log_dlen is greater than zero.

The transaction program must format the error data as a General Data Stream (GDS) error log variable. For further information, refer to IBM® Systems Network Architecture: LU 6.2 Reference: Peer Protocols.

Returned Parameters

If the verb executes successfully, Personal Communications returns the following parameters:
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 is nonblocking and has not completed, Personal Communications returns the following parameters:
primary_rc
AP_OPERATION_INCOMPLETE
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_ERROR_DIRECTION
  • AP_BAD_TP_ID
  • AP_SEND_ERROR_BAD_TYPE
    Displays a basic verb icon.
  • AP_SEND_ERROR_LOG_LL_WRONG
    Displays a basic verb icon.
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_ERROR_BAD_STATE

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.