rgetmsg()

Returns the error message for a specified error number, restricted to two-byte integers.

Syntax

mint rgetmsg(int msgnum, char *s, mint maxsize);
  1. msgnum is the error number, restricted to error numbers between -32768 and +32767.
  2. s is a pointer to the buffer that receives the message string (the output buffer).
  3. maxsize is the size of the output buffer. This value should be set to the size of the largest message that you expect to retrieve.
  4. The Informix® message text files are used to retrieve the message.

Returns

Table 1. Return codes
Code Description
0 The operation was successful.
-1227 Message file not found.
-1228 Message number not found in message file.
-1231 Cannot seek within message file.
-1232 Message buffer is too small.
Important: This function returns Informix specific messages; it will not work properly if the Informix client software is not installed.