Some applications store their messages in message catalogs.
You can modify these message catalogs to translate the messages to
another language or to customize them for your installation.
Before you begin
Review the following information:
You also must know:
- The commands that are indicated in these steps are z/OS® UNIX commands;
do all of these steps from the z/OS UNIX shell.
- These steps use a message catalog that is called sample.cat, and
assume that the application code and catalog are at the correct levels.
If you customize a catalog, IBM® Service
personnel might require that you use the shipped level of the catalog
to re-create and diagnose a reported problem.
Procedure
Perform the following steps to create a modified message
catalog:
- Copy the current z/OS UNIX catalog to a backup file to
ensure that you have a copy of the original catalog.
cp /usr/lpp/tcpip/lib/nls/msg/C/sample.cat /usr/lpp/tcpip/lib/nls/msg/C/sample.cat.backup
- Using the z/OS UNIX dspcat command,
convert the editable backup catalog that you just copied.
dspcat -t -g /usr/lpp/tcpip/lib/nls/msg/C/sample.cat.backup > /tmp/sample.cat.copy
The
file sample.cat.copy is the file that you will update to preserve
the timestamp and customize the messages.
- Change the first line in the catalog from
a comment to a z/OS UNIX gencat command
$timestamp directive. This enables the original timestamp
to be imbedded in the new catalog when the catalog is built. In some
cases, when an application opens a message catalog, it checks the
timestamp at the top of the catalog to ensure that it matches the
application timestamp. If the timestamps are different, the application
does not use the message catalog. You must ensure that the new message
catalog contains the timestamp from the original message catalog by
performing the following steps:
- Edit the file to be updated.
oedit /tmp/sample.cat.copy
- Change the first line comment to add a gencat command
$timestamp directive to preserve the timestamp when the directory
is built. The first line in the file is similar to the following line:
The time stamp of catalog /usr/lpp/tcpip/lib/nls/msg/C/sample.cat.backup is: 2010 095 20:30 UTC
Replace
the leading text on the line with the $timestamp directive as follows: $timestamp 2010 095 20:30 UTC
If
you omit this step and the original line is left unchanged in the
catalog, when you attempt to generate a catalog from this file, you
will see a message similar to the following message: FSUM5108 gencat: Invalid message number.
- Save the file.
- Update the catalog (/tmp/sample.cat.copy) with any local
modifications and save the file.
- Build a new and customized catalog by using
the z/OS UNIX gencat command.
gencat /tmp/sample.cat /tmp/sample.cat.copy
The
correct response is the following message: FSUM5105 gencat: Message catalog generated normally.
Tip: Verify that your changes are correct before invoking the gencat command.
Some errors cause the gencat command to fail, but
other errors might not be apparent until the message is displayed.
- Browse the new catalog and verify that the timestamp from
step 3 matches what is in
the file.
obrowse /tmp/sample.cat
The
first record contains the time stamp (yyyy ddd hh:mm UTC).
For example: ...2010 095 20:30 UTC
- Replace the z/OS UNIX catalog, which is shipped with
the release, with the updated catalog that you created in step 5.
cp /tmp/sample.cat /usr/lpp/tcpip/lib/nls/msg/C/sample.cat
What to do next
For more information about the
dspcat and
gencat utilities,
see
z/OS UNIX System Services Command Reference.