Part 4 Advanced Functions

 

 

Advanced functions of LP Plus are addressed in part 4. These features include:

Network management.

Event processing.

WinPrint™ client messaging.

Report segmenting and distribution.

Resource accounting.

Submitting print jobs through directory lookup.

Archive system

Network Management

LP Plus can both print over TCP/IP using the LPD/LPR protocol and receive print jobs from other LPD/LPR compatible hosts. This means it can print to and receive from any system or device that supports LPD/LPR protocol (most TCP/IP software are hardware products support LPD/LPR printing). LP Plus seamlessly integrates with any network environment either with LP Plus acting as a print server in a large UNIX network, or with LP Plus installed on multiple machines for centralized printer and print queue management.

With LP Plus on multiple UNIX hosts, commands and status information can be sent over TCP/IP to and from the LP Plus hosts. This allows one host to transparently manage all of the others. With the exception of viewing reports and the log file, all LP Plus commands and all status information can be controlled from one host. Control over multiple LP Plus hosts can also be accomplished using WinPrint™ from a Windows 3.1, 95, or NT client or the LP Plus Browse HTML interface and a standard browser.

 

LP Plus Network Commands

There are three network commands associated with LP Plus. Each performs a separate task. The commands are:

dcclpdser - The LPD server is used to accept print jobs from other applications that support the LPD/LPR protocol over a TCP/IP network. It must be active in order to receive print jobs from other remote hosts (LP Plus or other). 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 print daemon is already listening to socket 515 ("printer tcp/515" in the /etc/services file), the LP Plus dcclpdser will fail.

The LPD server can be started and stopped from the LP Plus Administration "Services" menu (refer to Daemon Administration in Part 3 for information on starting and stopping the LP Plus LPD server). It can also be started from the command line as follows:

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].

dccbkst - 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 LP Plus host that will be managed from either another LP Plus host on the network or from a WinPrint™ client. 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. The network status server is also used to accept network commands from WinPrint™ clients.

The network status server can be started and stopped from the LP Plus Administration "Services" menu (refer to Daemon Administration in Part 3 for information on starting and stopping the network status server). It can also be started from the command line as follows:

dccbkst [host_name] - The defaults are the "node name" 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".

dccnetstat - The LPD/LPR network status program is used to get print queue and printer status information from non LP Plus hosts. The remote system must support the LPD/LPR protocol. This command is rarely used and is only intended to get printer and queue information from LPD/LPR compatible hosts that do not have LP Plus installed. The resulting status information from the remote host is displayed as is.

 

Managing Remote LP Plus Hosts

LP Plus hosts can be managed remotely from the Status and Control menu of another LP Plus host or from a WinPrint™ client. This includes both print queue and printer commands and status information. The network status server (dccbkst) must be active on any host being managed from another LP Plus host or from a WinPrint™ client.

 

Remote Management From the Status and Control Menu (dccstat)

The Status and Control menu (dccstat) can access other LP Plus hosts and transparently get status information and issue commands across the network. The screen will look the same except of the "host" indication in the upper left corner will indicate which host is being controlled (see next page). Commands are issued just like they are for the local host. This remote access is available from the Status and Control main menu as well as the Printer Status and Control menu and applies to the print jobs as well as the printers. Remote hosts can be accessed and controlled on a single remote printer basis, all print jobs for all remote printers locally defined, or an entire remote host. Following is a description of each method.

SELECT AN ENTIRE REMOTE HOST

Remote hosts refer to other UNIX hosts that also have LP Plus installed. By selecting "Remote Hosts" from the "Lookup" dialog, a list of remote hosts is displayed (see following example). A remote host is displayed if there is an entry in the "$LPHOME/security/rmhosts" file or at least one printer on the local host is defined in the LP Plus Administration system (dccadmin) as an "LPPlus" type on the remote system. An example of this is a local printer called "hpsys1" which uses the mode "LPPlus" with a UNIX device name of "hp!ptr4" (host_name!remote_printer_name). Because the host name "hp" is used in the device name for local printer "hpsys1" it appears in the remote host dialog.

By selecting the host "hp", the Status and Control screen changes to reflect the new hosts print jobs (see following example). Except for viewing reports (the "v" command) and accessing the remote systems log file (the "l" command) all other print job and printer commands are available and are performed the same way as if the print jobs and printers were on the local system. To return to the local host, press the <ESC> key.

 

SELECT ALL REMOTE PRINTERS

Another method of accessing a remote LP Plus host, which narrows the number of print jobs and printers displayed, is by selecting "Switch Remote Host All Printers" from the Status and Control menu. This selection will display all printers or print jobs (depending on whether the command is executed from the Status and Control menu or the Printer Status menu).

To "switch" to the remote host and look at all of the print queues, position the cursor on any of the remote print jobs (or printers) and use the Command menu selection "6=Cmds" or the corresponding hot key "x". The screen will then display all the remote hosts print jobs and printers that are defined to the local host. Press <ESC> to return to the local host’s information.

SELECT A SINGLE REMOTE PRINTER

The method of accessing a remote LP Plus host, to only display a single remote printer and print jobs, is by selecting "Switch Remote Host This Printer" from the Status and Control menu. This selection will display only one printer and its print jobs (depending on whether the command is executed from the Status and Control menu or the Printer Status menu) for printers that are locally defined in the LP Plus Administration system (dccadmin) as an "LPPlus" type on the remote system.

An example of this is a local printer called "hpsys1" which uses the mode "LPPlus" with a UNIX device name of "hp!ptr4" (host_name!remote_printer_name). Because the mode is "LPPlus", an attempt will be made to communicate with the host "hp" and get printer or print job status for the selected printer on host "hp" that is defined to the local host.

To "switch" to the remote host and look at a single print queue on the host that is locally defined, position the cursor on the desired remote print job (or printer) and use the Command menu selection "6=Cmds" or the corresponding hot key "y". The screen will then display the remote hosts print jobs and printers that are defined to the local host. Press <ESC> to return to the local host’s information.

 

Remote Management From a WinPrint™ Client

LP Plus print queues and printers can also be managed using WinPrint™ running on a Windows 3.1, 95, or NT client. WinPrint™ allows Windows clients to do bi-directional printing to and from UNIX and control the LP Plus print queues and printers using a Windows GUI (see following examples).

Print queues and printers can be managed based on a single LP Plus print queue or all queues and printers can be managed on a per host basis. Only the network status server (dccbkst) needs to be running in order for WinPrint™ to manage the host. Refer to the WinPrint™ User Guide and Technical Reference for information on controlling LP Plus printers and print queues on UNIX from a Windows client.

Event Processing

Event processing in LP Plus refers to the ability to watch for a something to occur within LP Plus (e.g. printer goes disabled, print job fails, etc.) and then optionally performing a function based on the event. The action can be anything you like including sending a message to a Windows client via WinPrint™ (see WinPrint™ Client Messaging later in Part 4). Specific events have been set up so that when they occur, variables are passed and a shell script is executed ($LPHOME/event/script_name). These shell scripts are tied directly to an event. NOTE: The names of these scripts must not be changed. The event scripts are completely customizable so there is a great deal of flexibility with what can be done when an event occurs. Following is a description of the events and the shell scripts that are executed when they occur. The event scripts are all found in the $LPHOME/event directory.

 

 

EVENT

SCRIPT

A print job has failed either before printing began or during. The print job will be marked interrupted (intrd) and the printer will be disabled.

writefail.sh

A network printer has failed connection. This means LP Plus tried to initially connect to the printer and start printing but failed. That can happen if the printer or network is down.

connectfail.sh

A printer has been disabled. This can happen either by a user or it will automatically happen when a print job fails before printing begins or during printing.

disable.sh

A print job has been submitted to a printer that is disabled. The print job will be spooled into LP Plus but will not print until the printer is enabled.

prtunavail.sh

A printer has been enabled. This can happen only by executing the dccenable command from dccstat or the command line.

enable.sh

A print job requires a form that is not mounted on the printer. The print job goes to a status of form pending (fpend).

formpending.sh

A new form has been mounted on a printer.

formmount.sh

A printer interface script has completed. This occurs for all printers when any print job attempts to print (de-spool).

interface.sh

A print job has been purged from the LP Plus queue system. This happens after a print job is canceled or has printed and after the printers purge delay time has elapsed.

purge.sh

A non-network printer has failed connection. This means LP Plus tried to initially open the printer device to start printing, but failed. Possible causes are that the printer is turned off or is offline.

openfail.sh

 

 

 

 

EXAMPLE 1

An example of how to use event processing would be if the system administrator wanted to be alerted any time a printer was disabled. This would be done using the "disable.sh" script (shown below) because anytime a printer is disabled this event script is executed. To be alerted via a WinPrint™ message when any printer is disabled, only the alert command is required in the event script.

################# Disable Event Script ####################################

####

#### The following environment variables are available to

#### this script:

#### PRINTER

$LPHOME/bin/dccwinnotify pchost " ${PRINTER} has been disabled!"

exit 0

#########################################################################

In this example, the Windows client "pchost" running WinPrint™ is sent the message "printer_name" has been disabled! whenever any printer is disabled.

 

 

EXAMPLE 2

This example shows how to move a print job that has been spooled to a specific disabled printer to a new printer (perhaps you have a printer that is prone to failing). This is done by first knowing the print job has spooled to the disabled printer using the "prtunavail.sh" event script (see next page). This script gets executed anytime a print job spools to a disabled printer.

 

 

################# Request queued for disabled printer ########################

####

#### The following environment variables are available to

#### this script:

#### PRINTER

#### REQUEST_ID

if [ "$PRINTER" = "printer4" ]

then

$LPHOME/bin/dcclp -i {$REQUEST_ID} -d printer8

fi

exit 0

########################################################################

In the above example, anytime a print job gets spooled to "printer4", when the printer is disabled, the event script moves the print job "$REQUEST_ID" to printer8.

 

WinPrint™ Client Messaging

WinPrint™ client messaging is how LP Plus on a UNIX host sends messages to a Windows 3.1, 95, or NT clients. WinPrint™ allows Windows clients to do bi-directional printing to and from UNIX and control the LP Plus print queues and printers using a Windows GUI (see following examples).

 

 

With more UNIX users running Windows clients on their desktop than ever before, UNIX applications have had to accommodate these clients and their interface. UNIX based client/server applications and users who run Windows applications along with UNIX applications have made it necessary to have very tight interoperability between UNIX and Windows. LP Plus is no exception.

WinPrint™ running on the Windows client and LP Plus on a UNIX host allows messages to be sent from the LP Plus on the UNIX host to the Windows client. An example of use is the event processing example (see Event Processing previously in Part 4) where the Windows user is alerted that an event has occurred on the UNIX host.

Another example of a use for WinPrint™ is to send a message to a Windows user informing that their print job has printed. This alerts a user that their print job has printed and they may want to walk to the printer (see below).

The command that sends the message to WinPrint™ is "dccwinnotify". This command can be executed from the command line. Its usage is:

$ dccwinnotify host_name "message text"

An example is ($ dccwinnotify mikepc "You have spooled a print job to disabled printer lp0"). The host_name in this case "mikepc" has an entry in the "/etc/hosts" file and has WinPrint™ installed and running on the Windows client. In the WinPrint™ general settings the pop up messaging is enabled (see below) and the client is listening to the correct TCP port number.

Client messaging can be a valuable tool for alerting administrators and users of printing issues and, when used in conjunction with event processing and LP Plus, help make UNIX printing less problematic.

Report Segmenting and Distribution

LP Plus Version 3 has a new form type called advanced forms. Contact your sales representative regarding Report Distribution/Segmenting licensing. This type of form is used to segment reports (split them to multiple printers), apply multi-part FlexForm™ electronic forms to segments, split reports into even segments automatically and to print multiple copies of reports to different printers simultaneously. Advanced forms are accessed using the "dcclp -f form_name" command line or from the Status and Control menu "dccstat".

These advanced forms are setup using LP Plus Administration. As briefly mentioned above, there are several distinct uses for advanced forms including:

Split a print job into multiple equal segments and spool them to different printers.

Split a print job into multiple segments based on page numbers and spool them to different printers.

Print complete copies of a print job to several printers simultaneously.

Apply FlexForm™ electronic forms to any print job or segments.

Using the advanced form configuration screen (above) as described in the Advanced Forms section of Part 3, many different combinations of segmenting can occur. By selecting the appropriate LP Plus printer names and segment actions (Pg field), any of the above scenarios for segmenting and distribution can be achieved. The segment actions are described below:

"All" - Sends all of the original spooled print job to this segment.

"Split" - Sends an equal amount of the original print job to this segment. For example, if there are 3 segments the original print job is split into thirds.

"Number of Pages" - The last page number to print for this segment. The starting page number is based on the previous segments ending page or the beginning of the print job for the first segment. An example would be if you wanted pages 1 to 100 to print to segment 1, pages 101 to 200 to print to segment 2, and pages 201 to 300 to print to segment 3. The "Pg" field for each segment would be 1. Pg[100 ],

2. Pg[200 ], 3. Pg[300 ].

Another aspect of an advanced form is the ability to apply FlexForm™ electronic forms to a segment. FlexForm™ is an electronic forms software product also from Digital Controls. It allows you to create and/or replace preprinted forms with electronic forms overlays printed to laser printers, bar codes, multi-part forms, forms distribution, and more. FlexForm™ also integrates with UNIX fax software to provide a complete and professional image for your company. These are added to segments in the "FFE" field. Several examples of FlexForm™ are distributed with LP Plus.

Resource Accounting

LP Plus has a resource accounting log that provides printer usage information. This information can be used for charging users or departments for usage or tracking for other purposes. A record is added to the $LPHOME/messages/acctlog file for each print request that is printed. A record will be present for each report printed and each copy of that report. In the case of network printing, all copies will appear on one accounting record (e.g. a 10 page document with 10 copies printed to a network device will show 100 pages printed).

Account logging is turned off and on from LP Plus Administration (dccadmin). Select "System Defaults" from the "Setup" menu and then press the function key <F1> or (<CNTL> + f then 1) to move to the second screen. The entry at the bottom of the screen "Should the ACCOUNTING subsystem be enabled [n]" is displayed. The accounting system is turned off by default. To turn the accounting system on, press "y" in the field and then update (save) the default settings by pressing the function key <F3> or (<CNTL> + f then 3).

The accounting record contains 11 string fields delimited by the comma character. Each record contains:

1. Date and Time Stamp

2. Request ID

3. Host!User Name

4. Destination

5. Report Title

6. Form Name

7. Number of Pages (zero if page counting not done)

8. Number of Bytes (characters)

9. Print Time in Seconds

10. Exit Code (the exit code numbers are as follows)

0 -Good, 3-Read fail, 5-Write fail, 7-Dropped carrier (serial), 8-Interrupted, 9-Bad parameter count, 10-Cancelled, 11-Suspended, 12-Good (network printers), 13-Unable to connect

11. Group

EXAMPLE

Fri Jul 21 11:38:47 1996 ,RID0169,sdev3450!tomp,lp0,Billing21,invoice,1,905,2,0,guest

dccacctrep

The dccacctrep program is used to generate reports from the account log file. This program is started from dccadmin by selecting "Account Log Reporting" under the Utilities menu. The default format of the report will be displayed on a screen like the one shown below. This screen is an example of the "view" mode. The format of the report can be easily changed to suit your requirements by going into the "customize" mode (see later example).

 

"Page Break" Field -

The date field in the upper left corner of the example above is the "page break" field in the example above. This is the field that will generate a page break when the data in that field changes. Assuming the file is already sorted on that field, this is useful for fields such as date, user, group, and host. Any field can be designated as the "page break" field regardless of whether or not the field is selected to be on the report.

out file -

The default name of the output file is acctlog.rep. The default name is used when dccacctrep is started from dccadmin. Any valid filename can be specified if dccacctrep is run from the UNIX prompt.

 

Menu -

The menu bar on the bottom of the screen will change to accommodate the appropriate ("view/customize") mode. The following keys perform the functions below for dccacctrep:

F1 - Go to the next screen. In "view" mode the next 16 lines are displayed.

In "customize" mode the next 16 lines are displayed.

F2 - Go to the top of file (TOF).

F3 - Toggle "view/customize" mode. This allows you to quickly see what the report would look like if printed with the currently selected format.

F4 -Print a report using the current format ("view" mode).

Change the number of columns to "use" ("customize" mode).

F5 -Print a "raw" report using the current format ("view" mode). A raw report has no system. Change the page width and length ("customize" mode).

F6 - Display the format of the UNIX command that could be used to print a report in the current format ("view mode) (see the example below). More details on generating a report with a command from a UNIX prompt will be described later in this document.

Left & right arrow keys - slide view window if "page width" is wider than the screen.

Esc - exits this program.

? - displays the help screens for this program.

The following keys perform the functions below only in the customize mode:

up/down arrow keys - move the cursor up and down.

Return/Enter - moves the cursor down.

space bar - toggles the select/deselect status of the current field. Selected fields will be highlighted and are "selected" to appear on the report. The default number of columns for that field will appear in the "Use" column as the number of columns to use. Compare this with the number in the "Poss" column to see if you should change the number of columns to use (F4). If you are printing totals it is a good idea to view the totals and grand totals to be sure that you have specified enough columns to accommodate the totals.

> - Do a page break whenever the data in this field changes.

+ - Print totals for this field.

The display below is an example of a display generated as a result of pressing F6 in the "view mode". The following example shows that a report like the one in the screen following could be generated by entering this command at the UNIX prompt:

dccacctrep time rid user=8 dest=14 title=12 pages=8 + bytes=10 +

or

dccacctrep time=8 rid=4 user=8 dest=14 title=12 pages=8 + bytes=10 +

In this example, entering the number of columns for the time and RID is optional because 8 and 4 are the default number of columns for those fields.

An example of the "customize" display is shown below. The highlighted fields are fields that have been selected to appear on the report.

The columns for this display are:

Field - is the name of the field.

Poss - is the number of columns that could possibly be in this field.

Max - is the maximum number of columns found in this field for the current input file.

Use - is the number of columns to use in the report for this field. This may be larger than "Poss" or "Max" to achieve the desired spacing.

Note that Pos, Max, & Use do not include 1 trailing space for each field.

page width - is the page width in columns. If "page width" is blinking, the number of columns selected exceeds the page width.

page length - is the page length in lines. The page length does not include lines for headers or totals.

Complete Field For Present Line - displays all characters for this field; even if less characters are specified by "Use".

in file - is the input file name (default is /usr/lpplus/acctlog).

Formatted Line - The line directly above the menu bar is what the current line will look like using the currently selected format.

The example below shows a page with totals. Sub totals are displayed if a "page break" is specified. Totals are scaled from bytes to kilobytes, to megabytes as the number increases. ** displayed in the totals field indicates that the field width was exceeded.

Running dccacctrep from a UNIX command line prompt -

To run this program from a UNIX prompt enter the command dccacctrep with the desired arguments from the list below:

Notes:

n specifies number of columns to use for this field.

Leave out spaces between parameter and =.

pb selects one field to use for page break.

+ indicates totals are to be printed for this field.

line [=n] [pb or +] day [=n] [pb] date [=n] [pb]

time [=n] [pb] year [=n] [pb] rid [=n] [pb]

host [=n] [pb] user [=n] [pb] dest [=n] [pb]

title [=n] [pb] form [=n] [pb] pages [=n] [pb or +]

bytes [=n] [pb or +] seconds[=n] [pb or +] exit [=n] [pb]

group [=n] [pb]

pw=w (Page width. w=32-255. Default is 78.)

pl=l (Page length. l=10-90. Default is 50.)

sf=filename (source file name. Default is acctlog.)

df=filename (destination file name. Default is acctlog.rep)

raw (Print raw mode - no headers or totals).

-c (Use above arguments if any, but stay in interactive curses screen.)

Examples:

dccacctrep line=4 date=6 time=8 host=8 user=4 group=8 > pages=6 + bytes=8 +

dccacctrep day=3 rid=4 dest=8 title=16 form=12 seconds=6 + page_width=88 -c

Submitting Print Jobs through a Directory

For applications that do not print through the "lp" command, LP Plus can "look" at directories and print files as they arrive. This is done with the "dccscan" command. dccscan runs in the background and periodically checks for new files to be written to a specified directory. When a file arrives, dccscan submits the file as a print job using the "dcclp_options" specified when dccscan was executed. After the file is successfully submitted to the LP Plus queue system, dccscan removes the original file. Following is a description of the dccscan command with some examples of usage. To stop dccscan the process must be killed.

dccscan directory_path cycle_time delay_time "dcclp_options"

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, i.e., how often to check for new files.

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. These must be valid "dcclp" options.

EXAMPLE

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

This example looks in the directory "/tmp/dir" every 30 seconds for new files. It will check every 5 seconds after the file is initially found to determine when the file is no longer being accessed by another application. It will then submit the print job to "printer4", place the job on hold "-h", use the silent option "-s", and set the job to not purge "-o nopurge" after printing.

LP Plus Archive System

LP Plus Archive is a module that stores and retrieves documents spooled through LP Plus. The archived reports are compressed and stored at a user-defined location. Reports are "tagged" to be archived with a command line option or from the Status and Control screen of LP Plus. After the standard purge delay interval, the report is indexed and stored for later display. When a report is retrieved, it is displayed in the LP Plus report viewer and can be viewed or printed.

 

Activating and Configuring LP Plus Archive

You must have LP Plus installed for Archive to function properly. You must be logged in as "root" on the system console to use the following program.

arcadmin

The arcadmin program is used to set up file archiving. Since it is an optional feature, it is not part of dccadmin. To start this program you must enter the command arcadmin at the UNIX prompt. A display similar to the one following will appear. The following keys perform the functions below for arcadmin.

F3 - save these parameters and exit.

F4 - display available choices for the current line.

? - display help window for the current line.

Esc - Exit without saving parameters.

The following paragraphs describe each of the lines on this display.

Days remaining in the trial period - specifies the time left in the trial period. After this time expires archiving will continue if it is enabled but you will not be able to view the archive files or use arcadmin. If this field is blank, you may enter a "y" to start the free trial period. Once the system has been licensed and the validation codes entered, the screen will display "system licensed".

Archive Dir - is the directory used for archiving. This directory should be on a separate file system that has enough space to do the desired archiving.

Tmp Dir - the LP Plus Archive system gives you the option of compressing spool files as they are archived. These files must be uncompressed before they can be viewed or reprinted. The tmp directory is the directory where compressed archive files will be placed when they are uncompressed.

How long should archive files be kept - the LP Plus Archive system gives you the ability to automatically remove archived files after the "archive age" has passed. This can help ensure that the file system does not fill up. The "dccasweep" program reads this parameter and removes archived files that are older than the specified age. Files which are marked as "keep" will not be removed even if they are older than the "archive age". The "archive age" is specified as a number of days, months, or years.

How often should a new archive subdirectory be created - the LP Plus Archive system creates subdirectories under the archive directory for keeping spool files. The purpose of this is to enhance performance when searching, etc. This parameter specifies how often a new subdirectory should be created. Valid values for this entry are:

1 - Create a new directory every day

2 - Create a new directory every 10 days

3 - Create a new directory once a month

4 - Create a new directory once a year

How long should files be kept in the tmp directory - the first time a compressed file is accessed it is uncompressed into the tmp directory (see "Tmp Dir" above). This parameter tells the "dccasweep" program how many days (0-365) to leave the file in the tmp directory before removing it. The file is not removed after each access to minimize the number of times that it is uncompressed. This value should be set to a number of days to maximize performance, but not so high as to create space problems.

Serial Number - the serial number for Archive on this system. This number is generated by the Archive software.

Archive Validation Codes - archive may be enabled for a free trial period whenever you are ready to look at it. To enable the system permanently, you need to contact your LP Plus provider and give them your serial number. The LP Plus supplier can then provide you with activation codes to permanently enable the system.

 

Archiving Reports

Archiving spool files takes place after the report is printed. Marking a spool file to be archived can be accomplished in any of the following ways:

From the Command Line - The first method is to flag the spool file when it is submitted to LP Plus (spooled to dcclp). This is done by setting a "-o" command line parameter. After the report is printed and the purge delay time period has expired, the spool file is then archived. The Archive command line options for dcclp are described below:

"-o arch" - Archive this request and compress the file.

"-o archu" - Archive this request but do not compress the file.

"-o archk" - Archive this request but do not allow the sweep program to delete it.

"-o archuk" - Archive this request, do not compress it, do not sweep.

"-o noarch" - Do not archive this request (default).

EXAMPLE

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

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

Setting the LPPARCHIVE Environment Variable - The second method is to set the "LPPARCHIVE" environment variable. This will cause all print jobs to be archived in one of two ways. If LPPARCHIVE is set to "y", it is the same as having the "-o arch" command line option of dcclp set. LPPARCHIVE set to "u" is the equivalent to "-o archu". LPPARCHIVE set to "yk" is the equivalent to "-o archk". LPPARCHIVE set to "uk" is the equivalent to "-o archuk".

From the Status and Control Menu - Another method is from the Status and Control menu system. After a print job is spooled it can be marked for archiving directly from the menu (see below). The indication that the print job will be archived after printing is there will be an "A" in the "P" (Purge) column of the Status and Control screen (dccstat).

View Archive Files - Displays the Archive Report Selection screen (next page).

Archive Request - Archive this request. Do not compress the file.

Archive Request Keep - Archive this request. Do not allow dccasweep to delete.

Archive Request Compressed - Archive this request and compress the file.

Archive Request Compress Keep - Archive this request. Do not allow delete.

Do Not Archive - Do not archive this request.

 

Querying Archived Reports

After reports have been archived, they can be retrieved and then viewed, printed, or deleted. Accessing the Report Selection menu is accomplished by one of three methods. The first is to execute the LP Plus report viewer from the command line "dccview". This will display the Report Selection screen (back page) the first time "dccview" is executed by a user and will display the last file viewed on subsequent executions. The Report Selection menu can also be accessed from the Status and Control screen (dccstat) by pressing the "8" key and selecting "View Archive Files" from the menu (above). The last method is to press the hot key "a" or the function key <F5> (or <CNTL> + f then 5) to access the report viewer command menu while viewing a report. Below is a description of the Report Selection screen.

Fill in any combination of report attributes (see next page) by using the <TAB> key to move between fields and press [ENTER] to execute the query. NOTE: The Text field searches all the data within a report. The time to complete this will vary based on the size and quantity of reports searched.

From Date - The starting spool date range to search.

To Date - The ending spool date range to search.

Title - All or part of the title of a report.

User - The user who spooled the report.

Dest - The destination printer where the report was spooled.

Text - A text string within the report.

 

When the query is complete, a listing (above) of reports that match the query is displayed. From this screen a single or multiple reports (mark or unmark multiple reports with the space bar) can be viewed by pressing [ENTER], deleted by pressing <F5> (or <CNTL> + f then 5), or printed by pressing <F7> (or <CNTL> + f then 7). Refer to section 2 of this manual for information on The Report Viewer Screen.

Cleaning up the Archive and Temporary Directories

The program "dccasweep" can be executed at anytime to cleanup the archive directories and the temporary directories (refer to Configuring Archive in this supplement for information on the specific "dccasweep" time settings). When executed with no parameters the "dccasweep" program, using the values set with "arcadmin", removes the archived files in both the archive directories and the temporary directory used for repeated report viewing. To only clean up the temporary directory, use the "-t" option (e.g. dccasweep -t).

Dccasweep can be executed manually whenever you wish to clean up the archive directories, or executed automatically from the UNIX cron system. The LPHOME environment variable must be set from cron for dccasweep to function correctly. You should create a shell script that first sets LPHOME, then executes dccasweep. Refer to your UNIX documentation for information on setting up cron.