Difference between revisions of "SET PRINTER"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=SET PRINTER=
 
 
 
==Class==
 
Printing
 
 
 
 
==Purpose==
 
==Purpose==
 
Redirect printer output
 
Redirect printer output
Line 11: Line 4:
  
 
==Syntax==
 
==Syntax==
SET PRINTER TO [<device> | <filename> [ADDITIVE] | SPOOLER | <os-command> | <expC>]
+
SET PRINTER TO [<device> | <filename> [ADDITIVE] | \\SPOOLER | <os-command> | <expC>]
  
  
 
==See Also==
 
==See Also==
SET PRINT, PRINT, SETPRC(), GETENV()
+
[[EJECT]], [[GETENV()]], [[PRINT]], [[PUTENV()]], [[SET CONSOLE]], [[SET DEVICE]], [[SET MARGIN]], [[SET PRINT]], [[SETPRC()]]
  
  
 
==Description==
 
==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.
+
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 [[Configuration Files|configuration file]], 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
+
====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.
 
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 \\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.
+
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==
 
==Example==
<pre>
+
<code lang="recital">
set printer to spooler
+
set printer to \\spooler
 
set view to orders
 
set view to orders
 
set print on
 
set print on
 
list status
 
list status
 
set print off
 
set print off
set printer to</pre>
+
set printer to
 +
</code>
  
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 +
[[Category:Documentation]]
 +
[[Category:Commands]]
 +
[[Category:Set_Commands|PRINTER]]
 +
[[Category:Printing]]
 +
[[Category:Printing Set Commands]]

Latest revision as of 17:14, 23 November 2009

Purpose

Redirect printer output


Syntax

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


See Also

EJECT, GETENV(), PRINT, PUTENV(), SET CONSOLE, SET DEVICE, SET MARGIN, SET PRINT, SETPRC()


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 configuration file, 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 Server, Recital