void doValnsprmSemantics(int codePoint, String value) throws DisconnectException {
// special case the FDODTA codepoint not to disconnect.
if (codePoint == CodePoint.FDODTA) {
agent_.accumulateReadException(new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.DRDA_DDM_PARAMVAL_NOT_SUPPORTED),
Integer.toHexString(codePoint)));
return;
}
if (codePoint == CodePoint.CCSIDSBC ||
codePoint == CodePoint.CCSIDDBC ||
codePoint == CodePoint.CCSIDMBC) {
// the server didn't like one of the ccsids.
// the message should reflect the error in question. right now these values
// will be hard coded but this won't be correct if our driver starts sending
// other values to the server. In order to pick up the correct values,
// a little reorganization may need to take place so that this code (or
// whatever code sets the message) has access to the correct values.
int cpValue = 0;
switch (codePoint) {
case CodePoint.CCSIDSBC:
cpValue = netAgent_.typdef_.getCcsidSbc();
break;
case CodePoint.CCSIDDBC:
cpValue = netAgent_.typdef_.getCcsidDbc();
break;
case CodePoint.CCSIDMBC:
cpValue = netAgent_.typdef_.getCcsidSbc();
break;
default:
// should never be in this default case...
cpValue = 0;
break;
}
agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
new ClientMessageId(SQLState.DRDA_NO_AVAIL_CODEPAGE_CONVERSION),
new Integer(cpValue), value));
return;
}
// the problem isn't with one of the ccsid values so...
// Returning more information would
// require rearranging this code a little.
agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
new ClientMessageId(SQLState.DRDA_DDM_PARAMVAL_NOT_SUPPORTED),
Integer.toHexString(codePoint)));
}