VMS Help  —  TCPIP Services, LPR_LPD
    The Line Printer/Line Printer Daemon (LPR/LPD) supports the DCL
    commands PRINT, LPQ, and LPRM for remote printing.

    The LPR/LPD service allows you access to print queues on remote
    hosts and allows users on remote hosts to access print queues on
    your system.

    To use TCP/IP Services network printer services, you need the
    following:

    o  The name of the remote print queue

    o  Remote Print Server LPD protocol extensions software you need
       to use the PRINT /PARAMETERS command

    o  TCP/IP Services installed and LPR/LPD enabled on your OpenVMS
       system

1  –  Command Summary

    To use the remote printing features, enter the commands
    summarized below. For complete command descriptions, enter HELP
    and the specific command at the DCL prompt.

    DCL         UNIX
    Command     Command      Function

    PRINT       lpr          Prints files.

    LPQ         lpq          Displays status of a remote print queue.

    LPRM        lprm         Removes jobs from a remote print queue.

2  –  Remote Print Queues

    Your system manager can configure your system with LPR/LPD
    network services that allow you to use the DCL command PRINT
    to send print jobs to a print queue on a remote internet host.
    The remote host can be a UNIX system or another OpenVMS system
    running LPR/LPD.

    You print a local file at a printer on a remote host by
    specifying the remote queue name defined on your local host (see
    your system manager for queue names). LPD copies the file to the
    appropriate remote printer's spool directory. A copy of the file
    to be printed remains in the spooling queue until the printer is
    ready to print it.

    When you enter the DCL command PRINT to send a print job to a
    remote print queue, you use the /QUEUE qualifier to specify the
    queue name, plus any of the following qualifiers:

    /AFTER          /BACKUP        /BEFORE         /BY_OWNER
    /CONFIRM        /COPIES        /CREATED        /DELETE
    /EXCLUDE        /EXPIRED       /FORM           /HEADER
    /HOLD           /IDENTIFY      /JOB_COUNT      /MODIFIED
    /NAME           /NOTE          /OPERATOR       /PARAMETERS
    /PASSALL        /PRIORITY      /QUEUE          /SETUP
    /SINCE          /USER          /WIDTH

    Two of these qualifiers work differently with TCP/IP Services
    than they do in an OpenVMS environment without TCP/IP Services.
    These two qualifiers are:

    o  /FORM

    o  /PARAMETERS

                                   NOTE

       TCP/IP Services does not support layup definition files for
       print requests to remote print queues. A layup definition
       file sets up the layup features: borders, sheet margins,
       alternating margins, pages per sheet, first page, page
       order, and page grid.

2.1    /FORM

    The DCL command PRINT /FORM customizes the look of the printed
    page. This qualifier associates a form other than the default
    with the print job.

    To find out which forms are defined for your system, enter the
    following command:

    $ SHOW QUEUE /FORM

    To find out the currently mounted form or the default form, enter
    the following command:

    $ SHOW QUEUE queue /FULL

    If the form associated with a remote LPD queue specifies a /WIDTH
    value that is not the standard 132, LPD sends a "W" card in the
    job's control file with the width specified in the form.

2.2    /PARAMETERS

    TCP/IP Services supports numerous options for the DCL command
    PRINT /PARAMETERS. For example, it supports the PAGE_SIZE option
    as follows:

    $ PRINT/PARAMETERS=(PAGE_SIZE=size) /QUEUE=queue_name filename

    When you enter the PRINT /PARAMETERS=(option=value) command,
    enclose the following in quotation marks:

    o  Blanks

    o  Nonalphanumeric characters, including spaces and slashes

    You can use the following /PARAMETERS options for both local
    printing (standard DCL PRINT) and remote printing (DCL PRINT with
    LPR/LPD network services).

    DATA_TYPE          NUMBER_UP          PAGE_LIMIT
    PAGE_ORIENTATION   PAGE_SIZE          SHEET_COUNT
    SHEET_SIZE         SIDES

    For a full description of the options supported for DCL local and
    remote printing, enter the following command.

    $ HELP PRINT_PARAMETER

                                   NOTE

       This help is available only if the DECprint Supervisor
       (DCPS) software is installed on your system. See your system
       manager for more information.

    The following /PARAMETERS options are supported only for use with
    remote printing.

    HOST               MAIL
    NOFLAG             PRINTER

    o  Use the HOST and PRINTER options together to send a print job
       to any remote host and printer that do not have a specific
       print queue defined on the local system.

       In conjunction with the HOST and PRINTER options, you must
       also specify the /QUEUE qualifier. The value of /QUEUE should
       be TCPIP$LPD_OUT.

       For example, the following command specifies that the file
       PINS.LIS be sent to printer CT_LN05R on remote host BALT:

       $ PRINT/PARAMETERS=(HOST=BALT, PRINTER=CT_LN05R) /QUEUE=TCPIP$LPD_OUT PINS.LIS

       The HOST and PRINTER options allow you to use any available
       network printers without your system manager having to set
       up additional LPD remote queues for each of these printers.
       Specify the remote host name either by the host name or by
       its fully qualified domain name (such as PACE.STATS.RINGS_
       CORP.COM).

    o  The MAIL option causes the remote host to notify you through
       SMTP mail when the print job completes. The following command
       specifies the MAIL option:

       $ PRINT/PARAMETERS=MAIL /QUEUE=DPR_ANSI PINS.LIS

    o  The NOFLAG option suppresses printing of a banner (flag) page
       at an LPD queue.

       The following command specifies the NOFLAG option:

       $ PRINT/PARAMETERS=NOFLAG /QUEUE=DPR_ANSI PINS.LIS

2.3  –  Examples

    The following examples show how to use the remote queue printing
    capabilities of TCP/IP Services.

    1. This example sends local file PINS.LIS to the remote print
       queue defined locally as FAC3_ANSI and requests notification
       through SMTP when the job completes at the remote printer.

       $ PRINT /PARAMETERS=MAIL /QUEUE=FAC3_ANSI  PINS.LIS

    2. This example shows how to send a local file to the remote
       print queue defined locally as OUR_PS for printing at a remote
       printer. The command specifies that text be printed on both
       sides of each sheet. The file name is ROUGH.TXT.

       $ PRINT /QUEUE=OUR_PS /PARAMETER=(SIDES=2) ROUGH.TXT

    3. This command sends a print job to the remote queue defined
       locally as YOUR_PS.

       $ PRINT /QUEUE=YOUR_PS LET.LIS -
       _$ /PARAMETERS=(DATA_TYPE=POST,PAGE_ORIENTATION=LANDSCAPE,SIDE=2)

    4. This example sends a print job to Internet host PACE.SATRN.COM
       to print on printer K1_PRINTER.

       $ PRINT /QUEUE=LPD_OUTQ USER$4:[GRANT.FINAN.SALES]ANNUAL.TXT -
       _$ /PARAMETERS=(HOST=PACE.SATRN.COM,PRINTER=K1_PRINTER)

3  –  Remote Queue Status

    To display the status of jobs you send to a remote printer, use
    the LPQ command. The following information is displayed:

    o  Your name

    o  Current rank of job in the queue

    o  Names of the files in job

    o  Job identifier

    o  Total size of job in bytes

3.1  –  Examples

    The following examples show how you can use the LPQ command.

    1. This command displays all entries in the LPS40_QUE queue.

       $ LPQ LPS40_QUE

    2. This command displays information about job 4 in the print
       queue named OFFICE_QUE.

       $ LPQ OFFICE_QUE /ENTRY=4

    3. This command displays information about jobs 1, 2, and 3 in
       print queue PEACE_Q.

       $ LPQ PEACE_Q /ENTRY=(1,2,3)

    4. This command displays information about user NELSON's jobs in
       the print queue FRONT_Q.

       $ LPQ FRONT_Q /USER=NELSON

4  –  Removing Print Jobs

    To remove your jobs from a remote print queue, use the LPRM
    command. The LPRM command lets you remove the following:

    o  All of your active jobs

    o  All jobs, if you have the required privileges

    o  Selected jobs

4.1  –  Examples

    The following examples show how you can use the LPRM command.

    1. This command deletes job 7 from print queue BASE_Q.

       $ LPRM BASE_Q /ENTRY=7

    2. This command deletes jobs 555, 556, and 558 from queue BASE_Q.

       $ LPRM BASE_Q /ENTRY=(555,556,558)

    3. In this example, the system manager, who has the required
       privileges, deletes all jobs from queue MAIN_QUE.

       $ LPRM /ALL MAIN_QUE

5  –  Remote UNIX Files

    Your system manager can set up a local print queue to handle
    print jobs for files sent from a remote UNIX host. To print
    UNIX files on an OpenVMS printer, the UNIX user enters the
    lpr command. (For more information, see the appropriate UNIX
    documentation.)

    Local queues that are set up to receive UNIX print jobs support
    layup definition files. These are files are supported only
    on OpenVMS and are used to set the following layup features:
    borders, sheet margins, alternating sheet margins, pages per
    sheet, first page, page order, and page grid.

5.1  –  Examples

    The following example sends UNIX file /usr/stanton/recent.cnts
    to OpenVMS print queue REMOTE_QUEUE4 and specifies the formatting
    defined in the layup file called layup3. The REMOTE_QUEUE4 print
    queue is set up as a remote queue in the printcap file by the
    system manager.

    % lpr -Llayup3 -Premote_queue4 /usr/stanton/recent.cnts
Close Help