Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
User Commands (d - f) dspmsg(1)
NAME
dspmsg - Writes a message from a message catalog to standard output
SYNOPSIS
dspmsg [-s set_number]
catalog_name
message_number
[’default_message’]
[argument ...]
FLAGS
-s set_number specifies a set in the message catalog; the default set number is 1, if not specified
by -s set_number.
Operands
catalog_name specifies the message catalog.
message_number
specifies the message to be written to standard output.
default_me ssage
specifies the message to be written if dspmsg cannot find the specified message;
default_me ssage is optional.
argument supplies optional arguments to substitute into the message catalog or into the
default message; there is no limit to the number of arguments.
DESCRIPTION
The dspmsg utility writes a message from a message catalog to standard output. You must
specify the message catalog (catalog_name) and the message (message_number) to be written.
You can specify the set number with the -s flag, or let dspmsg default to set number 1.
The dspmsg utility allows an unlimited number of string arguments for substituting into the
specified message if it contains either the %s or the %n$s printf() function conversion
specifications.
If dspmsg cannot find the specified message it writes the optionally specified default_message.
If dspmsg cannot find the specified message and you do not supply a default, a system-generated
error message is written. You must enclose the default message in single quotes if you are using
the %n$s notation for message inserts.
You can follow the default message with optional arguments to substitute into the catalog mes-
sage or the default message. Missing arguments for conversion specifications are replaced by
null strings.
Environment Variables
These environment variables affect the execution of the dspmsg utility: LANG, LC_ALL,
LC_CTYPE, LC_MESSAGES, NLSPATH.
EXAMPLES
To display the set number 1, message number 2, of the catalog test.cat,enter:
dspmsg -s 1 test.cat 2 ’Message not found’
If you have not assigned message text to message number 2, dspmsg displays the default mes-
sage Message not found.
527188-021 Hewlett-Packard Company 3−19