Printer Control Features

Printer Independence

Each printer manufacturer has its own unique set of printer control strings for controlling printer operations, such as,  Set Top Margin, Auto-justify Off, Set Form Length, etc. Reality provides the facility to generate DataBasic print reports containing such commands that are independent of the type of printer receiving them. Such printer control commands are incorporated in a print report as Printer Independent Function Sequence (PIFS) parameters.

When the print data is despooled, the PIFS parameters are translated into printer control commands meaningful to the destination printer. This is done using the PRINTER.TABLES file which contains a set of printer definition items for each printer defined. The printer to which the Despooler is attached is specified in the Despooler definition item in the DESPOOLER.CONTROL file. This is used to identify the printer definition required from the PRINTER.TABLES file.

The PRINTER.TABLES entries must be generated using the Printer Definition Maintenance utility.

Prologues and Epilogues

The Spooler provides the facility to enter printer command strings (PCS) at the start of Despooler operation, or before a print job is despooled, or after the page skips at the end of a print job. Printer command strings at the start of Despooler operation or before a print job is despooled are called 'prologues' and print command strings at the end of a print job are called 'epilogues'.

For example, before printing starts, the printer may need to be initialised. A printer may need to be set with default conditions when it is first started or a special font may be required before a particular print job is despooled. In other cases, a printer may need instructions after printing is completed.

Printer command strings are created using the SPM commands and are stored as items in the PCS.OUTPUT file in SYSFILES. These items can be specified as prologue or epilogue items in a Despooler or formqueue definition using SPM.

A Despooler definition item can contain the item-id of a prologue PCS.OUTPUT item to be sent to the printer when the Despooler first starts, or at the start of each print job. To output a prologue before each print job, a '%' sign must precede the prologue item id in the Despooler definition item A formqueue definition item can contain the item-ids of prologue and epilogue PCS.OUTPUT items to be sent to the printer at the beginning and end of a print job.