Catalog Message Files in Virtual Printers


Contents

About this document
Overview
Messages of colon file
Displaying existing message catalogs
Creating the message catalog
Example

About this document

This document describes how to add new message commands for AIX. These message commands could be used for smit messages for virtual printers that might identify new printer options not currently covered in AIX drivers.

This document applies to AIX Version 4.x.


Overview

Virtual printers use message files for National Language Support just like other parts of AIX. The messages in the pioattr1.cat file are used for the lsvirprt command for displaying the text associated with each attribute. Message catalogs are also used at AIX 4.1 by the smit panels for changing printer attributes. This document describes how to create your own message file and then reference that message file in the limits field of a virtual printer definition so that the message will be displayed from smit.

Messages of colon file

Each line of the colon file has five fields.

                                  Colon file fields                                    
____________________________________________________________________________
                                     Example 1:
   :331:mL::[devices.cat,71,134;Hewlett-Packard LaserJet 5Si/5Si MX]   
____________________________________________________________________________
                                     Example 2:                                                         
   /usr/local/cat/bull924.asc::638_u:S[E015]I[1810516]EnR[pioattr1.cat,1,
                         780;pinwheel,sheetfeed=5,1]:5
____________________________________________________________________________
          |                          |                  |
FIELD     |        DESCRIPTION       |     EXAMPLE 1:   |      EXAMPLE 2:
----------|--------------------------|------------------|-------------------
Message   | This is the full path    | Use pioattr1:cat | /usr/local/cat/
Catalog   | name of the message      |                  | bull924.cat
Field     | catalog; when blank,     |                  |
          | usually refers to        |                  |
          | pioattr1.cat             |                  |
----------|--------------------------|------------------|--------------------
Catalog   | # in pioattr1.cat, etc   | 331              | 638
Number    |                          |                  |
----------|--------------------------|------------------|--------------------
Attribute | Name of attribute for    | ml               | _u
Name      | lsvirprt chvirprt        |                  |
----------|--------------------------|------------------|--------------------
Limits    | For smit menus and       | Not Used         | S[E015]I[1810516]
Field     | command line flags       |                  | EnR[pioattr1.cat,1,
          |                          |                  | 780;pinwheel,
          |                          |                  | sheetfeed=5,1]
----------|--------------------------|------------------|--------------------
Attribute | Value assigned to        | [devices.cat,    | 5
Value     | attribute                | 71,134;Hewlett-  | 
          |                          | Packard LaserJet |
          |                          | 5Si/5Si MX]      |
-----------------------------------------------------------------------------

Messages shown in preceding table

Message information can be found in four of the five colon file fields.
  1. The message catalog name is given in the first field.
  2. The message number from the catalog in the first field is used when the attribute is listed from lsvirprt or chvirprt.
  3. A message catalog and message number can be specified in the limits field. This can affect the smit text and can also be used to generate smit popup lists based on the message text. When this is used, the smit panels can be shown in the user's language.
  4. A message catalog and message number can also be used to include the value of the attribute. This would normally only be done for things like printer names.

Displaying existing message catalogs

The existing message catalog can be shown with the dspcat command.

For example, to display the default message catalog, use this command:

An excerpt from that table is shown here:
1 : 18 Double-High Print. (!: no;  +: yes)
1 : 19 Italics print (!: no;  +: yes)
1 : 20 (not used) Font file name
1 : 22 Name To Replace Host Name On Burst Page
1 : 23 (not used) Font ID
1 : 24 Font ID (overrides pitch and type style)
1 : 25 Font ID.  Use internal fonts if blank.
1 : 27 Restore the Printer at the End of the Print Job? (!: no;  +: yes)
1 : 29 Condensed Print (!: no;  +: yes)
1 : 30 Wrap Long Lines (!: no;  +: yes)
1 : 31 (not used) Page format flag
Individual message numbers can be displayed by using dspcat with the catalog set number and message number as follows:

Creating the message catalog

A message file can be created with a simple text editor such as vi. In AIX 4, there are more tools to work with this, but the file can be manipulated with a few simple commands.

 ---------------------------------------------------------------------
|    Line inside of the test.msg file  |  Comments                    | 
|--------------------------------------|------------------------------|
|$ file: test.msg                      | just treated as a comment    |
|$delset 1                             | removes old defintions       |
|$set 1                                | start set 1                  |
|1 Comment one\nline two of message    | Message Text                 |
|2 Message two                         | Message Text                 |
|$delset 2                             | Remove old Defs              |
|$set 2                                | start set 2                  |
|1 Message one of set                  | Message Text                 |
|$end of file: test.msg                | Last line in file,probably   |
|                                      |  a comment                   |
 ---------------------------------------------------------------------
just treated as a comment $delset 1 removes old definitions $set 1 start set 1 1 Comment one\nline two of message  Message Text 2 Message two Message Text $delset 2 Remove old Defs $set 2 start set 2 1 Message one of set  Message Text $end of file: test.msg Last line in file, probably a comment

Now generate the catalog file.

Use the gencat command:

Example

In this example you will:




[ Doc Ref: 9176306567578     Publish Date: Feb. 22, 2001     4FAX Ref: 6488 ]