Javadoc
Create error message or message argements to return to client.
The SQLERRMC will normally be passed back to the server in a call
to the SYSIBM.SQLCAMESSAGE but for severe exceptions the stored procedure
call cannot be made. So for Severe messages we will just send the message text.
This method will also truncate the value according the client capacity.
CCC can only handle 70 characters.
Server sends the sqlerrmc using UTF8 encoding to the client.
To get the message, client sends back information to the server
calling SYSIBM.SQLCAMESSAGE (see Sqlca.getMessage). Several parameters
are sent to this procedure including the locale, the sqlerrmc that the
client received from the server.
On server side, the procedure SQLCAMESSAGE in SystemProcedures then calls
the MessageService.getLocalizedMessage to retrieve the localized error message.
In MessageService.getLocalizedMessage the sqlerrmc that is passed in,
is parsed to retrieve the message id. The value it uses to parse the MessageId
is char value of 20, otherwise it uses the entire sqlerrmc as the message id.
This messageId is then used to retrieve the localized message if present, to
the client.