dspcat Command

Purpose

Displays all or part of a message catalog.

Syntax

To Display Messages in a Catalog

dspcat CatalogName [ SetNumber [ MessageNumber ] ]

To Format Output for the gencat Command

dspcat -g CatalogName [ SetNumber ]

Description

The dspcat command displays a particular message, all the messages in a set, or all the messages in a catalog. The dspcat command directs the messages to standard output.

Note: The dspcat command looks for the catalog files under the NLSPATH if the LC_FASTMSG is set to False in C or POSIX locale environment.

LC__FASTMSG specifies that default messages are used for the C and POSIX locales and that NLSPATH is ignored when LC__FASTMSG is set to True.

The default value for LC__FASTMSG will be True in /etc/environment.

The CatalogName parameter specifies a message catalog. The SetNumber parameter specifies a set in the catalog specified by the CatalogName parameter. The MessageNumber parameter specifies a particular message in the set specified by the SetNumber parameter. If you include all three parameters, the dspcat command displays the specified message. If you do not include the MessageNumber parameter, the dspcat command displays all the messages in the set. If you specify a nonexistent value for the SetNumber or MessageNumber parameter, the dspcat command displays an error message and returns a nonzero return value. If you specify only the CatalogName parameter, the dspcat command displays all the messages in the catalog. You must include the SetNumber parameter if you include the MessageNumber parameter.

The dspcat command uses the NLSPATH environment variable and the LC_MESSAGES category to find the specified message catalog if you do not use / (slash) characters in the value of the CatalogName parameter.

Flags

Item Description
-g Formats output to be used as input to the gencat command. The MessageNumber parameter is not valid when you use the -g flag.

Examples

To display message number 2 in set number 1 of the test.cat file, enter:

dspcat test.cat 1 2

Files

Item Description
/usr/bin/dspcat Contains the dspcat command.