HPlogo Native Mode Spooler Reference Manual: HP 3000 MPE/iX Computer Systems > Appendix C Page Level Recovery and Checkpoints

What is Page Level Recovery?

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Page Level Recovery is best illustrated by two examples:

  • Suppose the spooler is printing the 27th page of a spool file when the paper jams. After an operator has cleared the jam and repositioned the paper, recovery is the combined features of the spooler, the file system, and the printer which allows printing to resume automatically at the beginning of page 27 and continue from there.

  • Suppose the spooler runs out of paper after printing the 27th page of a spool file. Recovery is the same set of features which allows printing to resume automatically at the beginning of page 28, since page 27 was completely printed.

Whenever a spooler selects a spool file to print, it retrieves the final page printed the last time the file was selected. If this is the first copy of the file, or the previous copy printed to completion, the page is 0. This special value alerts the spooler to bypass recovery and start with the first page.

If this value is non-zero, the spooler sends a silent run control sequence to the printer. (Assume for this part of the discussion that the printer supports silent running). The sequence includes the target page value. The spooler begins sending spool file data in the normal fashion. As long as this data is for a page preceding the target page, the printer interprets it as if it were printing it, but does not actually print it on paper. When the target page is reached (as determined solely by the printer), the printer starts printing as well as interpreting.

The process is almost the same for a jam recovery or device power failure. After either of these situations occur and has been corrected, appropriate status is reported to the spooler. The spooler then asks the printer for the last page it successfully printed. That page + 1 becomes the new target page, and the spooler then invokes the same recovery mechanism described at the start of this section.

When is recovery used?

The spooler invokes the same mechanism in all the following situations:

  • When the printer reports a device power failure or paper jam.

  • When printing starts anywhere but at the beginning of the spool file:

    • A combination of SUSPEND and RESUME to any page other than 1.

    • Selecting a spool file whose output was interrupted the last time it was selected due to:

      • System shutdown,

      • A SPOOLF command (such as ;DEFER or ;DEV=<newdev>),

      • A SPOOLER <ldev>;STOP or ;SUSPEND;NOW;NOKEEP command.

      In any of these cases, the final page printed is stored with the spool file. When the spool file is again selected for printing, printing starts with the page following the last one printed.

Note that recovery is unexpected in the first case, but is expected in all the other situations.

Kinds of Page Level Recovery

There are three varieties of Page Level Recovery:

  • Restarting at a user-specified page number in a command such as SPOOLER 6; RESUME; OFFSET=-5.

  • Restarting at the point of interruption when a device exception occurs (such as a device power failure).

  • Restarting at the point of interruption when a particular spool file is (re)printed after being interrupted previously by a command such as SPOOLF #Onnn; DEFER or SPOOLER 6; STOP.

All three types of PLR use silent run techniques. Silent run is a mode in which data is sent to a printer and the printer interprets it but does not start actual printing until the printer reaches a target starting page specified by the host, in this case, the spooler.

Page Level Recovery requires a bidirectional interface to the printer and a specific Printer Job Language (PJL) feature support in the printer, namely, the JOB and EOJ commands, and the PAGE and JOB variables of the USTATUS command. For more information on PJL, refer to the Printer Job Language Technical Reference Manual (5961-0636).

NOTE: If either the bidirectional interface or required PJL support is missing, and printing is interrupted for any reason (device power failure, operator command, etc.), the entire file must be reprinted when printing is resumed. If the interruption is due to a device exception, a warning message to this effect is displayed on the system console or the $STDLIST of a user who has Associated the device. If it is due to an operator command, a similar message is displayed on the $STDLIST of the user who issued the command.

Components of successful Page Level Recovery

Recovery requires the combined features of the spooler, the file system, and the printer. The following subsections describe how each component contributes to recovery.

The spooler

Access to the entire spool file

The spooler manages the entire output object (the spool file). It is the only component of the three that can see the global picture. If the spooler were not present, meaning that the user application was sending output directly to the device, any recovery would have to be managed by the application.

This is often done by applications such as check printing programs, which print to unspooled devices using numbered checks whose supply is carefully controlled to prevent fraud. Such applications communicate with the printer operator to determine which check numbers are successfully printed and which are not, for any reason (paper jam, misalignment, ribbon malfunction or loss of ink, etc.).

Because the spooler can access any part of the spool file, it can select any part of the file as a starting point for retransmission. Its choice is determined by the other two components. This is a key feature of successful recovery.

Device independence

Another important property of the spooler is device independence. The spooler is a high level application that communicates with the printer. It does not know whether it is printing to an HP 2680 page printer, an HP 5000 page printer, an HP-IB CIPER printer, or a serially-connected printer. Any differences are managed at the printer storage manager (PSM) level of the file system. As a result, all communications to and from the file system and printer use the same interfaces and identical structures, regardless of which variety of printer may be connected to this particular spooler process. The spooler uses standard file system intrinsics such as FWRITE and FDEVICECONTROL for non-network printers.

This results in a "lowest common denominator" approach. This means that the spooler must support protocol demanded by any of the four printer types. If a particular protocol is not used or needed by the other types, its PSM must ignore it.

For example, at the end of every copy the spooler sends a special control sequence indicating that the copy has finished. The serial printer PSM uses this to disconnect the printer from either its DTC or its dialup line if no new spool file is started within a certain number of seconds. Since the spooler does not know whether its device is truly a serial printer, it must send this sequence after every copy. Non-serial printer PSMs simply ignore it (by reporting successful completion).

The file system

The file system supports spool file recovery in the following ways:

  • An enhanced status reporting and control interface allows printer and PSM status to be reported to the spooler, and allows the spooler to tell the printer its proper restarting page.

  • The PSMs hide printer differences from the spooler. All status reporting and spooler control uses a device-independent model. The model is based on the CIPER protocol, since that protocol has the richest feature set for recovery, but is used for non-CIPER printers as well.

The printer

The printer is an equal partner (with the spooler and the file system) in achieving reliable page-level recovery, that is, recovery to the start of a specific page. The printer contributes to recovery in two ways:

  • Only the printer knows where pages truly start. There are a number of vertical motion control sequences:

    • With the printer set at n LPI, a <CR> advances paper 1/n inch.

    • A half-line feed, Esc=, advances paper 1/2n inch.

    • The %200 series of CCTL codes advances paper a given number of lines at n LPI without regard to page breaks.

    • The %300 series advances paper a given number of lines determined by Vertical Forms Control (VFC) configuration.

    • If end-of-line wrap is enabled, the printer can advance paper without an explicit vertical motion control.

    • Bar codes advance paper differently from all of the above.

    • Other sequences advance paper based on dot rows or decipoints.

    Different printers support different subsets of these control sequences. Some are configurable or purchasable options in the same printer. For the spooler to determine page breaks, it would need a complete print engine based on the actual printer used. It would also need to know the configuration on the printer of all options which affect vertical motion. This is totally impractical, and, from a performance standpoint, unacceptable.

  • The printer's second contribution is the ability to silent run. This allows (re)printing to start at some page other than the beginning of the output without printing all the pages that preceded it.

Here is a list of the printers that support PLR:

  • Color LaserJet

  • LaserJet 4 family (except 4L)

  • HP 5000/C30 and C40

  • HP 2680

  • HP 2688

  • HP-IB CIPER

Feedback to webmaster