[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 4

piomsg Command

Purpose

Sends a printer backend message to the user.

Syntax

piomsg [ -u UserList ] [ -c MsgCatalog -s MsgSet ] -n MsgNumber ] [ -a MsgArg ] ... [ MsgText ]

Description

The piomsg command either retrieves a printer backend message from a message catalog or sends a specified message text to one or more users. The piomsg command runs when a print job is executed. Typically, the piomsg command is used in printer colon files to send a message to the user submitting a print job while the print job is processed by the piobe command.

When the -c, -s, or -n flags are specified, the piomsg command retrieves a message from a message catalog. The command searches for the message in the directory specified in the NLSPATH environment variable. If the NLSPATH environment variable does not contain a directory path, the piomsg command searches the /usr/lib/lpd/pio/etc default directory. If no message is found in the /usr/lib/lpd/pio/etc directory, the command supplies the text specified in the MessageText variable. When the -c, -s, or -n flags are not specified, the piomsg command returns the value (if any) of the MessageText variable.

Each message is parsed for the %s or %n$s printf subroutine conversion specifications. The printf conversion specifications are replaced with supplied message strings, if any, before the message is sent to the user. The piomsg command processes escape sequences, such as, linefeed /n or horizontal tab /t, that are embedded in the message.

Flags

-a MsgArg Specifies the message argument string. The value of the MsgArg variable is substituted into the message, if it contains the %s or %n$s printf subroutine conversion specifications. The -a flag can be specified up to 10 times to specify multiple arguments. If there are any errors while parsing conversion specifications, the original message is sent.
-c MsgCatalog Specifies the message catalog that contains the message to be retrieved. The -c flag must be specified with the -n flag.
-n MsgNumber Specifies the message number. The -n flag must be specified with the -c flag.
-s MsgSet Specifies an optional message set. The default value for the MsgSet variable is 1. The -s flag must be specified with both the -c and -n flags.
-u UserList Specifies the list of users who receive the message. The names of users or nodes in the UserList variable are separated by commas. To include a node name in the user list specify the @ character followed by a node name or address. If the -u flag is omitted, the message returns to the user who initiated the print job.

Examples

  1. To retrieve message number 100 in message set number 1 from the piobe.cat message catalog and send the message to user joe on the same node as the print server and tom on node foobar, enter:
    piomsg -u joe,tom@foobar -c piobe.cat -n 100
  2. To send a message with a message argument string to the user who submitted the print job, enter:
    piomsg -a "/usr/bin/troff" "The specified filter %s is not found\n"
  3. To retrieve message number 5 in set number2 from the xyz.cat, use a dummy message in the event of a failure, and send the message to the printer, enter:
    piomsg -cxyz.cat -s2 -n5 "xyz.cat is not installed.\n"
    Note: When the piomsg command cannot retrieve messages from the catalog specified with the NLSPATH environment variable or the default directory, the supplied message text is sent to the users.

File

/usr/lib/lpd/pio/etc/piomsg Contains the piomsg command.

Related Information

The piobe command.

The printf subroutine.

Printer Overview for System Management in AIX Version 4.3 Guide to Printers and Printing .

Spooler Overview for System Management in AIX Version 4.3 Guide to Printers and Printing .

Printer Backend Overview for Programming in AIX Version 4.3 Guide to Printers and Printing .


[ Previous | Next | Contents | Glossary | Home | Search ]