Examples

To process the SYMB.MSG message source file and redirect the output to the SYMB.SRC file, enter:

mkcatdef symb symb.msg > symb.src

The generated SYMB.H file looks similar to the following:

#ifdef        _H_SYMB_MSG
#define       _H_SYMB_MSG
#include <limits.h>
#include <nl_types.h>
#define       MF_SYMB "symb.cat"
/* The following was generated from symb.src. */
/* definitions for set MSFAC */
#define       SYM_FORM        1
#define       SYM_LEN 2
#define       MSG_H   6
#endif

MKCATDEF also creates the SYMB.SRC message catalog source file for the gencat command with numbers assigned to the symbolic identifiers:

$quote " Use double quotation marks to delimit message text
$delset 1
$set 1
1     "Symbolic identifiers can only contain alphanumeric \
characters or the _ (underscore character) but must begin with \
an alpha or _ character\n"
2     "Symbolic identifiers cannot be more than 64 \
characters long\n"
5     "You can mix symbolic identifiers and numbers\n"
$quote
6     remember to include the "msg_h" file in your program

The assigned message numbers are noncontiguous because the source file contained a specific number. MKCATDEF always assigns the previous number plus 1 to a symbolic identifier.

Note: MKCATDEF inserts a $delset command before a $set command in the output message source file. This means you cannot add, delete, or replace single messages in an existing catalog when piping to the gencat command. You must enter all messages in the set.


[Back: Flags]
[Next: Related Information]