Technical Reference

The Technical Reference portion of this manual briefly describes the way LP Plus processes print jobs and provides a list of all of the LP Plus commands that can be used from the UNIX command line. These items include:

Overview of Operation

Although LP Plus and the existing UNIX lp system perform the task of spooling or queuing print jobs to printers, they function differently. LP Plus is a more open print system in that there is access to print job files and it is easier to work with. That is, after there is an understanding of how LP Plus functions and where files are located. Below is a brief overview of how LP Plus works.

All print jobs are submitted to dcclp. This includes print jobs that come over the network via LPD/LPR. This is done in much the same way as the existing UNIX lp system. When a print job is submitted to dcclp it is indexed, and copied to the $LPHOME/reports directory in a file named RIDXXXX (XXXX is the sequential request id number). All of the information about the print job such as its printer, file type, form used, etc., is stored in the $LPHOME/queues directory in a file with the same name as the request id number. The dcclp program then sends a message to the LP Plus scheduler "dccsched".

The scheduler "dccsched", upon notification that there is a new print job, reads the print jobs information from the $LPHOME/queues/RIDxxxx file into shared memory. The scheduler controls what prints and when. When a print job is changed (e.g. by a user through dccstat) the above process is repeated. The scheduler executes the dccprint command when the print job is ready to print.

The command that takes care of printing is "dccprint". This command is normally executed by the scheduler. The dccprint program opens the port and sets stty parameters for serial printers and executes the interface script for the printer ($LPHOME/interfaces/printer_name). The interface script is customizable by the user (e.g. custom banner page). The interface uses the filter "dccfilter" to send the data to the port or to a second or third filter. After the print job data is through the filter, a status of completion (exit code) is sent back to dccprint which in turn sends the exit code to the scheduler. The scheduler, depending on the exit code, updates the print jobs queue information (e.g. status changed to "prntd").

Printer Interface Scripts

In order to despool (print), the LP Plus scheduler executes the LP Plus print daemon "dccprint" by means of a "system" function. When the print demon has successfully opened the printer, set any stty parameters, initialized the printer, and sent any print control information requested by the user to the printer, it forks and execs the interface script for that printer. The interface scripts are contained in the "$LPHOME/interfaces" directory. There is one for each printer.

The interface script assembles the parameters passed to it, optionally prints a banner page, and executes the LP Plus print filter. When the interface script gets control, STDOUT is the printer. So the filter reads the file directed to it by the interface script from STDIN and writes to STDOUT. If multiple copies are required, this operation is repeated by the interface script. When the printing has been completed, the filter returns to the interface script by means of an exit statement and the interface script ends. The printer daemon detects its child process changing state, sends any print control information requested by the user, and ends after notifying the scheduler.

The interface shell may be modified. A common reason for modification would be to customize the banner page.

Command Line Reference

dccaccept

Set a printer to accept print jobs.

dccaccept -d printer_name - Sets "printer_name" to accept print jobs.

EXAMPLES

$ dccaccept -d printer6 - Allows printer6 to accept print jobs.

dccadmin

Starts the LP Plus administration program.

dccbkst

Starts the LP Plus network status server

dccbkst [host_name] - The defaults are the "node name" of the system for the "host_name". There must be an entry in the /etc/hosts file for "host_name" and /etc/services file for "dccbkst 53971/tcp".

The LP Plus network status (dccbkst) server is used to accept and send LP Plus print queue and printer status and commands between LP Plus systems over a TCP/IP network. It must be running on each system that requires centralized management. The network status server is not required for LP Plus to send print requests to other systems or applications supporting the LPD/LPR protocol. The server listens to socket 53971 (the "dccbkst 53971/tcp" service in the /etc/services file) by default for incoming LP Plus commands. It also uses this socket to send printer and queue commands to other LP Plus systems.

EXAMPLE

$ dccbkst

dccbkstshut

Stops the LP Plus network status server (see dccbkst above).

dcccancel

Cancels a print job.

dcccancel -d printer_name - Cancels the currently active print job for "printer_name".

dcccancel -i RIDxxxx - Cancels the print job with Request ID (RID) "RIDxxxx".

EXAMPLES

$ dcccancel -d printer6 - Cancels the currently active (printing) print job on "printer6".

$ dcccancel -i RID0023 - Cancels print job "RID0023".

dccdestchg

Moves all print jobs from one printer to another.

dccdestchg current_printer new_printer - Moves all print jobs from the "current_printer" to the "new_printer".

EXAMPLES

$ dccdestchg printer3 printer9 - Moves all print jobs from printer3 to printer9.

dccdisable

Disables a printer from printing.

dccdisable -d destination - Disables the printer for "destination". While the printer is disabled print requests may still spool but will not print until the printer is enabled.

EXAMPLES

$ dccdisable -d printer6 - Disables printer6.

dccenable

Enables a printer for printing.

dccenable -d printer_name - Enables the printer for "printer_name".

EXAMPLES

$ dccenable -d printer6 - Enables printer6.

dccgrp

Performs a specified function on a group of print jobs.

dccgrp command group [new_form], [new_printer] - Performs "command" on the "group" specified. Valid commands are:

"cancel" - Cancels all print jobs in the group.

"form" - Changes the form for all print jobs in the group to "new_form".

"dest" - Changes the printer for all print jobs in the group to "new_printer".

"release" - Releases all print jobs in the group from hold.

"purge" - Sets the purge flag for all print jobs in the group.

"hold" - Hold all print jobs in the group.

"nopurge" - Sets the no purge (keep) flag for all print jobs in the group.

Print jobs can be grouped by:

[pr=x] - All print jobs with the priority x.

[unit=destination] - All print jobs for the printer destination "destination".

[owner=user_id] - All print jobs for the user [user_id].

[status=print_ job_status] - All print jobs with the LP Plus status "print_job_status".

[date=print_job_date] - All print jobs with queue date "print_job_date" in the form of YY/MM/DD.

[mine] - All print jobs with login_id "mine".

[all] - All print jobs in the LP Plus queues.

[n=new_form/new_printer] - Selects the new form or printer when the "form" or "dest" command is used.

EXAMPLES

$ dccgrp pr=10 mine - Changes all of the user’s (mine) print jobs to priority 10.

$ dccgrp dest st=fpend n=printer3 - Moves all print jobs with a status of "fpend" (form pending) to printer3.

$ dccgrp cancel unit=printer6 - Cancel all print jobs for printer6.

$ dccgrp hold all - Places all print jobs on hold.

dccgcancel

Cancels all print jobs based on a print job attribute.

dccgcancel print job attribute - Cancels all print jobs that match the print job attributes below:

[pr=x] - Cancel all print jobs with the priority x.

[unit=destination] - Cancels all print jobs for the printer destination "destination".

[ow=user_id] - Cancels all print jobs for the user "user_id".

[st=print job_status] - Cancels all print jobs with the LP Plus status "print_job_status".

[da=print job_date] - Cancels all print jobs with queue date "print_job_date" in the form of YY/MM/DD.

[mine] - Cancels all print jobs with the user’s login_id.

[all] - Cancels all print jobs in the LP Plus queues.

EXAMPLES

$ dccgcancel pr=20 - Cancels all print jobs with priority 20.

$ dccgcancel ow=maryp - Cancels all print jobs for user maryp.

$ dccgcancel st=intrd - Cancel all print jobs that are interrupted.

dccgdisable

Disables all printer destinations.

EXAMPLES

$ dccgdisable

dccgenable

Enables all printer destinations.

EXAMPLES

$ dccgenable

dccgsuspend

Suspends (stops printing) all print jobs on all printers.

EXAMPLES

$ dccgsuspend - Suspends all currently printing print jobs.

dcchealth

Checks to see if LP Plus is installed correctly and outputs any found discrepancies. This program can quickly determine and display many basic problems with the LP Plus system such as permission settings and corrupted queue entries.

dcchealth [-f] - Displays and optionally attempts to repair "-f" problems with LP Plus files.

EXAMPLE

$ dcchealth

dcclp

Submits print jobs to printers and changes print jobs after they are in the print queue.

dcclp [-d printer_name] [-f form_id [-H hold/resume] [-h] [-i request_id] [-n copies] [-o banner, nobanner, continue, purge, nopurge, restart={[x/-/+}, filebreak, nofilebreak, copybreak, nocopybreak, lfconv, nolfconv] [-p print_control] [-q priority] [-s] [-S character_set] [-t title] [-T graphics, simple, post, postNR, postDSC] [-W MM/DD/YY,HH:mm] file_name

[-d printer_name] - Optional - Desired printer destination. If not specified, the default printer will be used.

EXAMPLE

$ dcclp -d printer9 /usr/files/file4

[-F form_name] - Optional - Desired FlexForm™ form name. See Advanced Forms in Part 3 for more information about FlexForm™ electronic forms. If not specified, no form will be used.

EXAMPLE

$ dcclp -d printer2 -F /usr/lpplus/ffe/po.ffe /usr/files/file2

[-f form_name] - Optional - Desired form name. May be a custom form created through LP Plus administration or any form name. If not specified, the default "stock" will be used.

EXAMPLE

$ dcclp -d printer2 -f checks /usr/files/file2

[-H hold/resume] - Optional - Place the print job on hold or resume (take the print job off hold).

EXAMPLE

$ dcclp -d printer5 -H resume /usr/files/file9

[-h] - Optional - Place the print job on hold.

EXAMPLE

$ dcclp -d printer5 -h /usr/files/file9

[-i request_id option1 option2 ...] - Optional - Change a print jobs attribute. Changes an existing print jobs attribute to "option1" "option2" ....

EXAMPLE

$ dcclp -i RID0217 -d printer8

$ dcclp -i RID0220 -f checks -d printer3 -n 3

[-n copies] - Optional - Number of copies for a print job. The default is 1.

EXAMPLE

$ dcclp -d printer1 -n 7 /usr/files/file9

[-o banner, nobanner, continue, purge, nopurge, restart={x/- /+}, filebreak, nofilebreak, copybreak, nocopybreak, lfconv, nolfconv] - Optional - Request options. With the exception of restart=n, these options are used to override those specified through LP Plus administration. Refer to Part 3 LP Plus Administration for detailed information on these options.

EXAMPLE

$ dcclp -d printer2 -o banner /usr/files/file2

$ dcclp -dprinter4 -o nopurge /usr/files/file3

[-p print_control] - Optional - Print control directory. Specify the print control directory name to use for special printer control. The default is the printer name (e.g. $LPHOME/prtcntl/printer6). The print control directory ($LPHOME/prtcntl/print_control_name) contains a preload and postload file used for controlling printers on a job-by-job basis. The preload and postload files contain the printer control (escape sequences) codes and are sent to the printer before and (optionally) after the request. Refer to Part 3 LP Plus Administration for detailed information on printer control files.

EXAMPLE

$ dcclp -d printer2 -p landscape /usr/files/file1 - Sends the preload (and optional postload) file $LPHOME/prtcntl/landscape/preload to the printer before the print request.

[-q priority] - Optional - The print jobs priority. The default is 20. Valid range is 0 to 39 with 0 being the highest priority.

EXAMPLE

$ dcclp -d printer7 -q 1 /usr/files/file2

[-s] - Optional - Silent option. Turns off the verbose information provided when the print job is submitted.

EXAMPLE

$ dcclp -d printer1 -s /usr/files/file10

[-S character_set] - Optional - Specify an optional character set to use.

[-t title] - Optional - The print jobs title. The default is the file name or STDIN if piped into dcclp.

EXAMPLE - $ dcclp -d printer8 -t report6 /usr/files/file6

[-T graphics/simple/post/postNR/postDSC] - Optional - Specify the file type for the print job. The default is for LP Plus to attempt to determine what type of file is being spooled. This can be overridden by specifying the file type. The file types recognized by LP Plus are:

"simple" - ASCII only data.

"graphics" - The file contains non-printable characters (e.g. control characters) such as PCL or other format.

"post" - The file is a postscript file but does not conform to the Document Structuring Conventions (DSC) as described in the second edition of the Postscript Language Reference Manual by Adobe Systems Inc.

"post-NR" - The file is a postscript file that conforms to the DSC but has inter page dependencies. Although LP Plus will count pages, the request can only be restarted on page one.

"post-DSC" - The file is postscript and conforms to the DSC. Because it does not have inter page dependencies, LP Plus will count pages and allow restarts at any page.

EXAMPLE

$ dcclp -d printer7 -T postDSC /usr/files/file2 - Tells LP Plus that the file is a postscript file that conforms to the Document Structuring Conventions (DSC).

$ dcclp -d printer7 -T graphics /usr/files/file2

[-W MM/DD/YY,HH:mm] - Optional - When to print the print job. The default is immediately.

EXAMPLE

$ dcclp -d printer9 -W 03/28/96,03:10 /usr/files/file4 - Print the job at 3:10 AM on the 28th of March 1996.

dcclpdser

Starts the LP Plus Line Print Daemon (LPD) server.

dcclpdser [host_name] [service_name] - The defaults are the "node name" for the "host_name" and "printer" for "service_name". There must be an entry in the /etc/hosts file for "host_name" and /etc/services file for "service_name".

The LPD server is used to accept print jobs from other applications that support the LPD/LPR protocol over a TCP/IP network. The LPD server is not required for LP Plus to send print requests to other systems or applications supporting the LPD/LPR protocol. The LPD server listens to socket 515 by default (the "printer" service in the /etc/services file) for incoming print jobs. Because only one application can listen to a socket at a time, if the UNIX lp line pint daemon is already listening to socket 515 ("printer tcp/515" in the /etc/services file) the LP Plus dcclpdser will fail. Consult your Network administration documentation for information on stopping the UNIX line print daemon. If you are unable to do this, contact Digital Controls.

EXAMPLES

$ dcclpdser - Starts the LP Plus LPD server with default settings.

$ dcclpdser bighost printer - Starts the LP Plus LPD server using the host_name "bighost" and the service "printer" from the /etc/services file.

dcclpdshut

Stops the LP Plus line print daemon (LPD) (see dcclpdser above).

dcclplink

A shell script used to link (replace) LP Plus to the UNIX lp system. This allows applications to continue to print to "lp -d ..." and the print jobs to be spooled into the LP Plus queuing system as opposed to UNIX lp. Refer to Appendix B for this and other integration issues.

dcclpunlink

A shell script used to unlink LP Plus from the UNIX lp system. This puts back what the script dcclplink (above) performed. Refer to Appendix B for this and other integration issues.

dccmount

Mounts a form on a printer.

dccmount -d printer_name -f form_name - Mounts a form "form_name" on the specified "printer_name".

EXAMPLES

$ dccmount -d printer3 -f checks - Mounts form "checks" on "printer3".

dccnetstat

Checks and displays printer and queue status on LPD/LPR compatible systems without LP Plus (dccbkst) installed.

dccnetstat [-d printer_name] - The network status program is used to get status information from systems supporting the LPD/LPR protocol. The printer_name must be a valid LP Plus printer with the netprint or system mode. The information returned from the remote system is displayed as it comes from the remote system.

EXAMPLES

$ dccnetstat -d printer3 - Displays the remote systems queue information for the local printer "printer3".

dccrange

Prints a range of page from an existing LP Plus print job. Spools another print job consisting of pages nnnn through nnnn.

dccrange RIDnnnn r=nnnnn-nnnnn [d=printer_name] [F=FlexForm™ form_name] [f=form_name]

RIDnnnn - The Request ID for the print job.

r=nnnn-nnnn - The range of pages to print from the print job. Spools another print job consisting of pages nnnn through nnnn.

EXAMPLE

$ dccrange RID0024 r=10-235

[d=printer_name] - Optional - New printer to send the range of pages to.

EXAMPLE

$ dccrange RID0024 r=10-235 d=printer3

[F=FlexForm™ form_name] - Optional - New FlexForm™ electronic form to use with the range of pages.

EXAMPLE

$ dccrange RID0024 r=10-235 d=printer3 F=fourup.ffe

[f=form_name] - Optional - New standard form to use with the range of pages.

EXAMPLE

$ dccrange RID0024 r=10-235 d=printer3 f=checks

dccreject

Sets a printer to reject print jobs. While the printer is rejecting, no print jobs will spool.

dccreject -d printer_name - Sets "printer_name" to reject print jobs.

EXAMPLES

$ dccreject -d printer6 - Sets printer6 to reject print jobs.

dccscan

Looks at a specified directory for files to print.

dccscan directory_path cycle_time delay_time "dcclp_options" - Looks in "directory_path" for files to print.

directory_path - The full pathname to an existing directory to scan for files.

cycle_time - The "cycle_time" refers to the number of seconds between "scans" to see if a file is in the directory.

delay_time - The amount of time in seconds to delay after the file is no longer being written before spooling begins. This ensures the application is finished writing the file before LP Plus spools the print job.

"dcclp_options" - The options to use when printing the file.

EXAMPLE

$ dccscan /tmp/dir 30 5 "-d printer4 -h -s -onopurge"

dccsched

Starts the LP Plus print scheduler.

dccsched - Starts the LP Plus print scheduler. This daemon must be active for despooling (printing) to occur.

EXAMPLE

$ dccsched

dccshut

Stops the LP Plus print scheduler (see dccsched above).

dccshut - Stops the LP Plus print scheduler.

EXAMPLE

$ dccshut

dccstat

Starts the LP Plus Status and Control program in request mode and displays all print jobs and printers.

dccstat -d destination - Starts the LP Plus Status and Control program and only displays print jobs and printers for the specified destination.

dccstat -u user_id - Starts the LP Plus Status and Control program and displays only the requests for the specified user id.

EXAMPLES

$ dccstat - Starts the LP Plus Status and Control program in request mode and displays all requests and printers.

$ dccstat -d printer2 - Starts the LP Plus Status and Control program in request mode and displays only the requests and print destinations for "printer2".

$ dccstat -u jimb - Starts the LP Plus Status and Control program in request mode and displays only the requests for the user "jimb".

$ dccstat -u $LOGNAME - Starts the LP Plus Status and Control program in request mode and displays only the requests for the user who is currently logged in.

dccsuspend

Suspends (stops printing) a currently printing print job.

dccsuspend -d printer_name - Suspends the currently printing print job for "printer_name".

dccsuspend -i RIDxxxx - Suspends the print job with Request ID "RIDxxx".

EXAMPLES

$ dccsuspend -d printer6 - Suspends currently printing print job on "printer6".

$ dccsuspend -i RID0029 - Suspends print job "RID0029".

dccswitch

Routes print jobs destined for original_printer to new_printer.

dccswitch original_printer new_printer - This command moves all current print jobs from the original_printer to the new_printer and causes all incoming print jobs to be routed from "original_printer" to "new_printer". If a printer goes down and you do not want any new print jobs to go into the downed printers queue, you can have any new print jobs routed to another printer.

EXAMPLE

$ dccswitch printer2 printer8

dccview

Executes the LP Plus report viewer. This is usually accomplished through the Status and Control program "dccstat".

dccview RIDXXXX - RIDXXX refers to the Request ID number for the print job to view.

EXAMPLES

$ dccview RID0233

dccwinnotify

Sends a message to a WinPrint™ client.

dccwinnotify host_name "message text" - Sends a message to a WinPrint™ client "host_name", WinPrint™ must be installed and running on a Windows 3.11, 95, or NT client. The host name must have an entry in the "/etc/hosts" file. The "message text" is the desired message to have pop-up on the clients screen.

EXAMPLE

$ dccwinnotify mikepc "Printer7 has been disabled. Check dccstat for problems"

Environment Variables

Below are all of the environment variables associated with LP Plus. They are set using the UNIX export command (e.g. LPDEST=printer3;export LPDEST).

COPYBREAK

Sets the LP Plus copybreak option. Whether or not to place a form feed between the copies of a print job. The valid options are N for No and Y for Yes. If set, the appropriate copybreak or nocopybreak options will be set (e.g. COPYBREAK=Y) will make all LP Plus requests have the "-o copybreak" set.

DATATYPE

Sets the data type for spool files (e.g. DATATYPE=graphics). The valid options are simple, graphics, post, postNR, postDSC. See the "dcclp -T" option above for detailed information on the file types.

FILEBREAK

Sets the LP Plus filebreak option. Whether or not to place a form feed after a print job. The valid options are N for No and Y for Yes. If set, the appropriate filebreak or nofilebreak options will be set (e.g. FILEBREAK=Y) will make all LP Plus requests have the "-o filebreak" set.

LPDEST

Sets the default printer for the user. The valid options are any existing LP Plus destination (e.g. LPDEST=printer4).

LPHOME

The environment variable LPHOME must be set to the base directory where LP Plus resides (e.g. LPHOME=/usr/lpplus). This must be part of any user’s environment who runs LP Plus. When LP Plus initially installs, an entry for the LPHOME variable is set in the /etc/profile. The PATH must also be set to reflect the LP Plus binaries directory (e.g. /usr/lpplus/bin). This is also set in the /etc/profile when LP Plus installs.

LPPATTR

Sets the Status and Control programs "dccstat" highlighting attributes. Use LPPATTR for a user’s preference or when there are problems with a terminal supporting the defaults. Without being set, the Status and Control program "dccstat" screen displays the LP Plus version number at the top of the screen and the screen commands at the bottom of the screen in reverse video. The current cursor position (which print job is highlighted) is displayed in bold. Based on the default settings, the valid options to alter these are:

B - bold is bold - reverse is reverse (same as default)

b - bold is bold - reverse is bold

R - bold is reverse - reverse is bold

r - bold is reverse - reverse is reverse

N or n - no highlighting

LPPAUTO

Sets the update or refresh interval for the Status and Control screen "dccstat". Valid options are 5 to 600 seconds. The default is every 5 seconds.

LPPAUTOMODE

Sets the mode that the Status and Control program "dccstat" uses to automatically update the screen display. The valid options are U for Update which will update the LP Plus queues at the interval specified with LPPAUTO=n. The result is real-time monitoring where new print jobs are displayed as they spool and purged print jobs are removed. The other option is R for Refresh which will only update the current screens new information (e.g. print job status and page counts). The update modes can also be turned on or off from the "4=Update" screen command within "dccstat".

LPPCONFIRM

Sets the LP Plus confirmation variable. The valid options are N for No. The Status and Control program will not prompt with Yes/No confirmation (e.g. Do you wish to cancel?).

PRTCNTL

Sets the print control directory to use for print jobs. The directory name must exist in the $LPHOME/prtcntl directory (e.g. PRNTCNTL=landscape). Refer to Printer Control File Management in Part 3 for more information on print control files.

SILENT

Sets the dcclp verbose mode. The valid option is Y for Yes. The messages from "dcclp" will not be displayed on the command line (this includes error messages). This has the same effect as the "-s" dcclp option.

VIEW132

Sets the hexadecimal control codes for placing the user’s terminal into 132 column mode when using the LP Plus report viewing program. The valid options are the ASCII representation of the hex control codes to place the terminal into 132 column mode (e.g. VIEW132=1b313332). LP Plus will convert these codes to send them to the terminal.

VIEW80

Sets the hexadecimal control codes for placing the user’s terminal into 80 column mode when using the LP Plus report viewing program. The valid options are the ASCII representation of the hex control codes to place the terminal into 80 column mode. LP Plus will convert these codes to send them to the terminal.

VIEWCOL

Sets the number of columns (132) to automatically place the user’s terminal into wide mode for viewing reports through the LP Plus report viewing program. This automatically sends the variable VIEW132 to the user’s terminal when the report viewer is executed. The valid option is 132.

WHEN

Sets the LP Plus print time option. The valid options are a date in the form of YY/MM/DD,HH:MM. This will cause the "-W" option to be set for all print jobs (e.g. WHEN=95/01/29,03:00 would cause all print jobs submitted to be "timed" for 3:00AM).