Purpose
Use
this function when an application program needs to send a VTAM-specific
response to CMIP services. This function is not used to send ROIVapdu,
RORSapdu, or ROERapdu responses.
One message that is sent by
MIBSendResponse is MIB.DeleteResponse. For a list of these responses,
see VTAM-specific requests and responses.
Declarations
The
following declarations indicate the order of the parameters for this
function.
typedef int MIBSendResponse_t(
int, /* link identifier - input */
unsigned int, /* invoke identifier - output */
const void *, /* local identifier - input */
const char *, /* source - input */
const char *, /* destination association
const char *, handle - input */
const char *); /* message - input */
Parameters
- link identifier
- Specifies
the link identifier returned by the MIBConnect function.
- invoke identifier
- This
is the invoke identifier of the request which is being responded to
with this API call.
- local identifier
- Pointer
to the local identifier of the object that is responding. Specify
the same identifier as the one specified in the request.
- source
- The
distinguished name of the originator of the request. This can be used
to override the source of the message. This is used to resolve any
appearance of the MIB variable distinguished name. Specify
NULL if you do not choose to specify a value.
- destination association handle
- This
is the association identifier of the association that is to be used
to send the response. It is required and must be the same as the association
handle that was received on the message that is being answered.
- message
- This
is a pointer to a formatted string which contains the string header
and the response data.
Return codes
- 0
- The function was successful.
- MB_ERR_ALLOC
- An error occurred allocating storage. If MB_ERR_ALLOC is received
by the application program from an API function and there is a corresponding
REQS record in the VIT with a nonzero return code, the LPBUF pool
is not large enough and should be increased.
- MB_ERR_ASSOC_HANDLE_MISSING
- The association handle parameter was not provided.
- MB_ERR_CMIP_SERVICES_INACTIVE
- CMIP services is inactive.
If using common storage area storage,
the read queue exit routine stops functioning.
If using data
space storage, messages are not put on the data space.
- MB_WARN_DATA_SPACE_FULL
- If using a data space and the data space is out of storage, this
warning is returned to remind the application program that no messages
will be returned to this application program. This message will still
be routed to CMIP services.
- MB_WARN_EXIT_FAILURE
- If using common storage area storage and the application program
has indicated that it has had an unrecoverable error when returning
to the read queue exit routine, this warning is returned to remind
the application program that no messages will be returned to the application
program. This message will still be routed to CMIP services.
- MB_ERR_INVALID_LINK_ID
- The value specified on the link identifier parameter does not
refer to a valid connection.
- MB_ERR_INVALID_INVOKE_ID
- The invoke identifier parameter was not provided.
- MB_ERR_LOCAL_ID_MISSING
- A local identifier was not provided.
- MB_ERR_MSG_MISSING
- The message parameter was not provided.
- MB_ERR_TRANSMIT
- An apparent error occurred. Either there is a logic error in VTAM®, or the MIBDisconnect function
has been issued, but it has not completed.
- MB_ERR_VTAM_INACTIVE
- VTAM is inactive.
Example of function in an application program
The
following example shows how the MIBSendResponse function can be coded
in an application program.
const char *AssocHandle;
int LinkId;
int rc;
void *LocalId;
unsigned int InvokeId;
rc = MIBSendResponse(LinkId,InvokeId,
LocalId,NULL,AssocHandle,,
"MIB.DeleteResponse(1,processingFailure)");