Difference between revisions of "SET PRINTER"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
==Class== | ==Class== | ||
Printing | Printing | ||
Line 11: | Line 8: | ||
==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== | ||
− | [[ | + | [[EJECT]], [[GETENV()]], [[PRINT]], [[PUTENV()]], [[SET CONSOLE]], [[SET DEVICE]], [[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 | + | 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== | ||
− | < | + | <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</ | + | set printer to |
+ | </code> | ||
Revision as of 10:31, 17 April 2009
Class
Printing
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 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 Database Server, Recital Mirage Server, Recital Terminal Developer