Placing a print job in a remote print queue

When using TCP/IP to print files, you can use this procedure to place a job in a remote print queue.

In order for you to place a job in a remote printing queue, your host name must appear in the /etc/hosts.lpd file of the remote host (the queuing system does not support multibyte host names). To implement changes to the /etc/hosts.lpd file without restarting the system, use the System Resource Controller (SRC) refresh command. Also, you must be able to determine the queue name and the remote printer name in your local /usr/lib/lpd/qconfig file.

  1. Find the appropriate queue name and remote device name. The queue name usually begins with the letters rp followed by a numeral or set of numerals. The remote printer name usually begins with the letters drp followed by a numeral or set of numerals.
  2. Enter the following command:
    enq -P QueueName:PrinterName FileName

    where QueueName is the name of the queue (such as rp1), and PrinterName is the name of the printer (such as drp1) as found in the /usr/lib/lpd/qconfig file. Do not omit the colon (:) between the QueueName and the PrinterName. FileName is the name of the file that you wish to print.

The following are examples of how the enq command can be used:

  • To print the file memo on the default printer, type:
    enq memo
  • To print the file prog.c with page numbers, type:
    pr prog.c | enq

    The pr command puts a heading at the top of each page that includes the date the file was last modified, the name of the file, and the page number. The enq command then prints the file.

  • To print the file report on the next available printer configured for the fred queue, type:
    enq -P fred report
  • To print several files beginning with the prefix sam on the next available printer configured for the fred queue, type:
    enq -P fred sam*

    All files beginning with the prefix sam are included in one print job. Normal status commands show only the title of the print job, which in this case is the name of the first file in the queue unless a different value was specified with the -T flag. To list the names of all the files in the print job, use the enq -A -L long status command .