Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

mkcatdefs(1) OSS Shell and Utilities Reference Manual
NAME
mkcatdefs - Preprocesses a message source le
SYNOPSIS
mkcatdefs catname source_le ... [-h]
FLAGS
-h Suppresses the generation of a _msg.h le. This ag must be the last argument to the
mkcatdefs command.
Operands
catname is the name of a message catalog
source_file is a text le you create to hold messages printed by your program
DESCRIPTION
The mkcatdefs utility preprocesses a message source le to change symbolic identiers into
numeric constants. The mkcatdefs utilitystandard output is a set of commands suitable for
passing to the gencat utility, which creates a new message catalogue. In addition, mkcatdefs is
used in producing a le named catname_msg.h containing denition statements that equate your
symbolic identiers with set numbers and message ID numbers assigned by mkcatdefs. The
catname_msg.h le is required in your application program if you use symbolic identiers.
See the explanation of the gencat utility for a description of input format for commands. The
only difference between gencat and mkcatdefs is that gencat requires a number to identify each
message, while mkcatdefs accepts either a number or a symbolic name. The mkcatdefs pro-
gram can send message source, data with numbers instead of symbolic identiers to standard out-
put.
A symbolic name is converted to a number in the mkcatdefs output. Each set and message in a
program must have a unique number or symbolic name. Symbolic identiers can contain letters,
digits, and underscores. The rst character cannot be a digit or an underscore. You cannot use a
symbolic name for a set in the $delset command.
The mkcatdefs program is designed to create new message catalogs, not to change existing ones
incrementally. Thus, its rst operation on each set is to delete it, in case the catalog contains a
set with that number. The sets specied in source_le are assigned numbers in ascending order,
starting at 1. Within each set, messages are also assigned numbers in ascending order, starting at
1. If you assign a message to a number in your source_le, mkcatdefs continues its ascending
series with that number.
EXAMPLES
1. The following example shows a message source le with symbolic message identiers
and quoted messages:
$quote " Use a double quotation mark to delimit message text
$set MSFAC Message Facility - symbolic identifiers
SYM_FORM "Symbolic identifiers can contain only letters \
and digits and the _ (underscore character)\n"
5 "You can mix symbolic identifiers and numbers \n"
$quote
MSG_H Remember to include the "_msg.h" file in your program\n
In this example, the $quote command sets the quote character to " (double quote), then
disables it before the last message, which contains double quotes.
When you process the le with mkcatdefs, the modied source is written to standard
output.
614 Hewlett-Packard Company 527188-003