[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 2


gencat Command

Purpose

Creates and modifies a message catalog.

Syntax

gencat CatalogFile SourceFile ...

Description

The gencat command creates a message catalog file (usually *.cat) from message text source files (usually *.msg). The gencat command merges the message text source files, specified by the SourceFile parameter, into a formatted message catalog, specified by the CatalogFile parameter. After entering messages into a source file, use the gencat command to process the source file to create a message catalog. The gencat command creates a catalog file if one does not already exist. If the catalog file does exist, the gencat command includes the new messages in the catalog file.

You can specify any number of message text source files. The gencat command processes multiple source files, one after another, in the sequence specified. Each successive source file modifies the catalog. If the set and message numbers collide, the new message text defined in the SourceFile parameter replaces the old message text currently contained in the CatalogFile parameter. Message numbers must be in the range of 1 through NL_MSGMAX. The set number must be in the range of 1 through NL_SETMAX.

The gencat command does not accept symbolic message identifiers. You must run the mkcatdefs command if you want to use symbolic message identifiers.

Note: Standard output is used if the - (dash) character is specified as the CatalogFile parameter. Standard input is used if the - (dash) character is specified as the SourceFile parameter.

Exit Status

This command returns the following exit values:

0 Successful completion.
>0 An error occurred.

Examples

To generate a test.cat catalog from the source file test.msg, enter:

gencat test.cat test.msg

The test.msg file does not contain symbolic identifiers.

Files


/usr/bin/gencat Contains the gencat command.

Related Information

The dspcat command, dspmsg command, mkcatdefs command, runcat command.

The catclose subroutine, catgets subroutine, catopen subroutine.

For more information about the Message Facility, see Message Facility Overview for System Management in AIX 5L Version 5.1 System Management Guide: Operating System and Devices.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]