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

gencat(1) OSS Shell and Utilities Reference Manual
NAME
gencat - Creates and modifies a message catalog
SYNOPSIS
gencat catalog_file [source_file ...]
FLAGS
Operands
FLAGS
Operands
catalog_file is the name of a message catalog file. The naming convention for message cata-
log files uses the .cat extension.
source_file is a text file you create to hold messages printed by your program. The naming
convention for message source files uses the .msg extension. You can use any
text editor to enter messages into the text source file. Messages can be grouped
into sets that represent general functional subsets of your program. Each mes-
sage has a numeric identifier, which must be unique within its set. The message
source file can also contain commands recognized by gencat for manipulating
sets and individual messages.
DESCRIPTION
The gencat command can be used to create a message catalog (usually ending in .cat) from a
message text source file (usually ending in .msg).
A message text source file is a text file that you create to hold messages printed by your program.
Message source files usually have the .msg suffix. You can use any text editor to enter messages
into the text source file. Messages can be grouped into sets, generally to represent functional
subsets of your program. Each message has a numeric identifier, which must be unique within its
set. The message text source file can also contain commands recognized by gencat for manipu-
lating sets and individual messages.
The gencat utility does not recognize symbolic names for messages. If you use symbolic names
rather than numeric constants to refer to messages, use the mkcatdefs utility to preprocess the
source_file. The mkcatdefs utility accepts symbolic names and their associated messages; the
output generated by the mkcatdefs utility is used as input to gencat.
If a message catalog with the name catalog_file exists, gencat modifies it according to the state-
ments in the message source files. If it does not exist, gencat creates a catalog file with the name
catalog_file.
You can specify any number of message text source files. The gencat command processes multi-
ple source files one after the other in the sequence that you specify them. Each successive source
file modifies the catalog. If you do not specify a source file, the gencat command accepts mes-
sage source data from standard input. Note that you can specify a dash (-) for the catalog file
(standard output) or the source file (standard input).
The gencat utility conforms to the XPG4 specification. In an XPG4-conforming application, set
numbers must be integers in the range of 1 to NL_SETMAX, inclusive, and message numbers
must be integers in the range of 1 to NL_MSGMAX, inclusive.
The catalog_file can contain the following commands. Each initial keyword or number must be
followed by a space or a tab character. The gencat utility ignores any line beginning with a
space, a tab, or a $ (dollar sign) character followed by a space, a tab, or a newline character.
Thus, you can use these sequences to start comments in your catalog_file. Blank lines are also
ignored. Finally, you can place comments on the same line after the $delset, $quote, $len,or
$set commands, because the gencat utility ignores anything following the preceding syntax ele-
ments.
42 Hewlett-Packard Company 527188-003