There are several tools used to access msg.gdb. These tools are found in the msgs component, and they are enter_messages, and modify_messages. To enter a new message run source/msgs/enter_messages, and answer all questions as follows:

  • Facility: For a complete list of the facilities select * form facilities in msg.gdb, (JRD, QLI, etc.)

  • Module: The module name (source file) which uses this error message.

  • Routine: The name of the routine which uses this error message.

  • Public: Specify Y if this message should be defined in iberror.h as a message that can be interpreted correctly by the client

  • Symbol: The mnemonic for the error. Note: What ever you specify here will automatically be prepended with isc_. Also note that the mnemonic you enter is limited to 32 characters, not including isc_ which will be added later. If you are adding a message to a facility other than JRD, the symbol for the message should be of the following format:

    <facility>_error.
    

    For example, a GBAK error that will be public would have the form:

    gbak_can_not_restore.
    
  • Text: The text you wish to appear where the error is generated, limited to 118 characters.

  • SQLCODE: Only if the message will be public

  • SQLCLASS: Only if the message will be public. Reserved for future use.

  • SQLSUBCLASS: Only if the message will be public. Reserved for future use.

Once you are done press Ctrl-D (or Ctrl-Z) at the prompt to break out, and enter_messages gives you the number of the message you just entered.

Running codes.exe will regenerate iberror.h which will now contain the new error messages.

Like this post? Share on: TwitterFacebookEmail


Related Articles


Author

IBPhoenix

Published

Category

Articles

Tags