PRINTER |
![]() ![]() ![]() |
The PRINTER command provides control for print units.
Format
PRINTER {print.unit} action
The print.unit argument identifies the print unit on which the action is to occur and must be in the range -1 to 255. If omitted, print unit zero is used.
The action may be any of the following. Multiple actions may be specified in a single PRINTER command and will be performed in the order in which they occur on the command line.
The PRINTER command sets or reports the settings of printer control parameters. The action of each keyword is described in detail below.
PRINTER print.unit AT printer.name Subsequent output is directed to the named printer. The printer.name must be a printer defined in Windows.
PRINTER print.unit BOTTOM.MARGIN n Sets the bottom margin size. On reaching the foot of the page, n blank lines will be output to reach the start of the next page. This value defaults to 0 and is reset on closing a print unit.
PRINTER print.unit CLOSE The print unit is closed. This action overrides any previous use of the KEEP.OPEN option. If this print unit was directed to a spool file, the data will be printed. Any heading and footing text or file name associated with the printer is discarded and further use of this print unit by a program or command will start a new file.
PRINTER print.unit FILE filename recordname Selects the destination for printed output. Output to print units 1 to 255 is normally directed to a hold file. This command associates a record of a directory file with the print unit. The record is not created until the first output is directed to the print unit.
PRINTER print.unit KEEP.OPEN Allows merging of successive printer output into a single print job. Any request from a program to close the print unit clears the heading and footing but leaves the print job open to receive further output. The print unit is finally closed, and the job printed, by using the CLOSE option to this command. On Windows systems it may be important that the Print Manager option to start printing while a print job is being created is disabled as this could result in the printer being assigned to an incomplete job.
PRINTER print.unit LEFT.MARGIN n Sets the left margin size. Each line will be indented by n spaces. This value defaults to 0 and is reset on closing a print unit.
PRINTER print.unit LINES n Sets the number of lines per page. No validation of the value of n is performed. The effect of specifying a number of lines per page greater than that of the physical device on which the data is subsequently printed is undefined. This value defaults to 66 and is reset on closing a print unit.
PRINTER print.unit QUERY Reports the current settings of the width, lines per page, top margin, bottom margin and left margin
PRINTER print.unit RESET Resets to the default values for width, lines per page, top margin, bottom margin and left margin. This function does not affect any file association.
PRINTER print.unit TOP.MARGIN n Sets the top margin size. Each page of output will commence with n blank lines. This value defaults to 0 and is reset on closing a print unit.
PRINTER print.unit WIDTH n Sets the number of characters per line. No validation of the value of n is performed. The effect of specifying a width greater than that of the physical device on which the data is subsequently printed is undefined. This value defaults to 80 and is reset on closing a print unit.
See also: |