Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
mkcatdefs(1) OSS Shell and Utilities Reference Manual
NAME
mkcatdefs - Preprocesses a message source file
SYNOPSIS
mkcatdefs catname source_file ... [-h]
FLAGS
-h Suppresses the generation of a _msg.h file. This flag must be the last argument to the
mkcatdefs command.
Operands
catname is the name of a message catalog
source_file is a text file you create to hold messages printed by your program
DESCRIPTION
The mkcatdefs utility preprocesses a message source file to change symbolic identifiers into
numeric constants. The mkcatdefs utility’ standard 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 file named catname_msg.h containing definition statements that equate your
symbolic identifiers with set numbers and message ID numbers assigned by mkcatdefs. The
catname_msg.h file is required in your application program if you use symbolic identifiers.
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 identifiers 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 identifiers can contain letters,
digits, and underscores. The first 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 first operation on each set is to delete it, in case the catalog contains a
set with that number. The sets specified in source_file 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_file, mkcatdefs continues its ascending
series with that number.
EXAMPLES
1. The following example shows a message source file with symbolic message identifiers
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 file with mkcatdefs, the modified source is written to standard
output.
6−14 Hewlett-Packard Company 527188-003