SET PRINTER

From Recital Documentation Wiki
Revision as of 17:18, 10 March 2009 by Yvonnemilne (Talk | contribs)

Jump to: navigation, search

SET PRINTER

Class

Printing


Purpose

Redirect printer output


Syntax

SET PRINTER TO [<device> | <filename> [ADDITIVE] | SPOOLER | <os-command> | <expC>]


See Also

SET PRINT, PRINT, SETPRC(), GETENV()


Description

The SET PRINTER TO <device> | <filename> command causes output to the printer to be redirected into a file or to a printer attached to a serial communications line. The <device> | <filename> is the name of the target device or filename. The environment variable DB_PRINT, which is defined in the product login file (login.com, profile.db or profile.uas), contains the command that is used to print a text file. This command can be set to a user specific value when the user logs into the system. You can therefore associate groups of people with specific printers, or change the options specified as default with the print command depending on the specific file to be printed.

ADDITIVE If the printer output is being directed to a file, specifying the ADDITIVE keyword will cause the output to be appended to any existing file contents rather than overwriting the file.

The SET PRINTER TO SPOOLER command causes all textual output to the printer to be stored in a text file on the disk, and then queued to the printer queue for printing when the output is finished. Any commands which have the TO PRINT clause specified cause the current contents of the spool file to be sent to the system printer (as specified in DB_PRINT).

The SET PRINTER TO <os-command> | <expC> command works in the same way as SET PRINTER TO SPOOLER, except it prints the temporary file with the <os-command>. The <os-command> is any valid operating system print command. The <expC> must evaluate to a valid operating system print command. The SET PRINTER TO command on its own closes the current print file or device. If the SET PRINTER TO SPOOLER command had been specified, the text file is sent to the printer queue.


Example

set printer to spooler
set view to orders
set print on
list status
set print off
set printer to


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer