Negative Responses and SNA Sense Codes
SNA sense codes may be returned to an LUA application in the following
cases:
- When the host sends a negative response to a request from the LUA application,
this includes an SNA sense code indicating the reason for the negative response.
This is reported to the application on a subsequent RUI_READ verb, as follows:
- The primary return code is LUA_OK.
- The Request/Response Indicator, Response Type Indicator, and Sense Data Included Indicator are all set to 1, indicating a negative response which includes sense data.
- The data returned by the RUI_READ verb is the SNA sense code.
- When Personal Communications receive incorrect data from the host, it generally sends a
negative response to the host and does not pass the incorrect data to the
LUA application. This is reported to the application on a subsequent RUI_READ or RUI_BID verb, as follows:
- The primary return code is LUA_NEGATIVE_RSP.
- The secondary return code is the SNA sense code sent to the host.
- In some cases, Personal Communications detect that data supplied by the host is not valid,
but cannot determine the correct sense code to send. In this case, it passes
the incorrect data in an Exception Request (EXR) to the LUA application on
an RUI_READ verb in the following way:
- The Request/Response Indicator is set to zero, indicating a request.
- The Sense Data Included Indicator is set to one, indicating that sense data is included (this indicator is normally used only for a response).
- The message data is replaced by a suggested SNA sense code.
The application must then send a negative response to the message; it may use the sense code suggested by Personal Communications, or may alter it.
- Personal Communications and Communications Server may send a sense code to the application to indicate that data
supplied by the application was not valid. This is reported to the application
on the RUI_WRITE verb that supplied the data, as follows:
- The primary return code is LUA_UNSUCCESSFUL.
- The secondary return code is the SNA sense code.