AIX Printer Tips: Catalog Message Files in Virtual Printers
Contents
About This Document
Overview
Messages of Colon File
Displaying Existing Message Catalogs
Creating the Message Catalog
Example
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.
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.
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 Catalog Field |
This is the full path name of the message catalog;
when blank, usually refers to pioattr1.cat |
Use pioattr1.cat |
/usr/local/cat/bull924.cat |
Catalog Number |
# in pioattr1.cat, etc |
331 |
638 |
Attribute Name |
Name of attibute for lsvirprt chvirprt |
ml |
_u |
Limits Field |
For smit menus and command line flags |
Not Used |
S[E015]I[1810516]
EnR[pioattr1.cat,1,780;
pinwheel,sheetfeed=5,1] |
Attribute Value |
Value assigned to attribute |
[devices.cat,71,134;
Hewlett-Packard
LaserJet 5Si/5Si MX] |
5 |
Messages Shown in Preceding Table
Message information can be found in four of the five colon file fields.
-
The message catalog name is given in the first field.
-
The message number from the catalog in the first field is used when the attribute
is listed from lsvirprt or chvirprt.
-
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.
-
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.
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:
-
dspcat pioattr1.cat 1 780
pinwheel,sheetfeed
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 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:
-
gencat output source
-
gencat test.cat test.msg
In this example you will:
-
Create a Message File
-
Create a Catalog File
-
Display the Catalog with dspcat
-
Place the file in /usr/local/cat
-
Add the entry to a custom colon file
-
See the results with lsvirprt
1. Create a Simple Message File
Create the file test.msg containing the following:
$ file: test.msg
$set 1 device description
1 1=Blue paper, 2=Red Paper, 3=checks
$set 2
1 Set 2 Message 1
$ end of file: test.msg
2. Create a Catalog File
3. Display the Catalog with dspcat
1 : 1 1=Blue paper, 2=Red Paper, 3=checks
2 : 1 Set 2 Message 1
4. Copy the Catalog to /usr/local/cat
-
mkdir /usr/local if needed
-
mkdir /usr/local/cat if needed
-
cp test./cat /usr/local/cat
5. Add the entry to a custom colon file
-
cd /var/spool/lpd/pio/@local/custom (AIX 4.1)
-
cd /var/spool/lpd/pio/custom (AIX 3.2)
-
vi >queue:queue_dev<: for queue you want to change
-
Change _u value to /usr/local/cat/test.cat:1:_u::1
6. See results with lsvirprt
-
lsvirprt
-
Select queue that you changed.
-
Enter u or attribute you changed.
Name Description Value
_u 1=Blue paper, 2=Red Paper, 3=checks 1
Catalog Message Files in Virtual Printers: AIX Printer Tips: vpmsg.html ITEM: FAX
Dated: 99/01/29~00:00 Category: zap
This HTML file was generated 99/06/24~12:42:11
Comments or suggestions?
Contact us