PRINT.LIT

Updated June 2019; see History

PRINT {spooler=}<wildcard list> {switches}

PRINT supports the switches given in the table below. You only need to include enough characters of the switch name to specify it uniquely. Thus /NOB is equivalent to /NOBANNER, etc. Also, the default for most switches may be set by a statement (e.g. BANNER = OFF) in the INI for that printer.

If the spooler name is omitted, the default (as specified by the PRINTER property in miame.ini) will be used. It must match up with a spooler initialization file named %temp%\<spooler>.pqi or sys:<spooler>.ini or ashcfg:<spooler>.pqi which contains the configuration parameters for that logical printer. Under A-Shell/Windows, you can also use the special spooler name "PROMPT" (which displays a typical Windows printer selection dialog) or you can specify a printer name that is recognizable by Windows (i.e. the type that appear underneath the printer icons). In these last cases, there will be no printer initialization file, and a default configuration consisting of PASSTHROUGH=OFF and PITCH=AUTO will be used.

A-Shell does not include an internal implementation of the spooler, and instead uses the "natural" spooler for the host operating system. Thus, the precise effect of most of the option switches described will vary from one operating system to the next. See Printer Configuration for more information.

Switches

Switch

Function

/{NO}B

Controls whether a banner is sent at the start of the printout. Under Windows this has no effect. Under most UNIX versions, the default spooler behavior is to force a banner regardless, unless the option to request no banner has been specifically enabled with something like:  # /usr/lib/lpadmin –p <ptr> -onobanner

/C:##

Specify number of copies of file to print.

/{NO}D

Controls whether the file is deleted after printing.

/{NO}FF

Controls whether a formfeed is sent after the last page.

/{NO}H

Controls whether a header is printed at the top of each page indicating the filename, time, date, and page number. Since this feature is not offered by most non-AMOS spoolers, the A-Shell PRINT command has to simulate it by creating a temporary file with the headers and then spooling that file in place of the original.

/{NO}LA

(Windows only) Overrides the ORIENTATION parameter in the printer ini file.  

/LPP:##

When used in conjunction with the /HEADER option, defines the number of lines printed per page.

/M:##

When used in conjunction with the /HEADER option, defines a left margin size.

/{NO}PA

Passthrough switch: controls whether the file is sent "raw" to the printer or is allowed to be "cooked" by the printer driver. Refer to the discussion on PASSTHROUGH for more information on this important topic.

/OVERLAY:fspec

 

/PREFIX=fspec

Allows you to specify a file that will be prepended (as a prefix) to the file you are printing (overriding any PREFIX option specified in the printer INI).

/{NO}PREVIEW

Set behavior of APEX to preview or not preview received reports. This value overrides user setting. PRINT.LIT 3.0(123).

/Q

Standard query switch – causes each matching filename to be displayed and the user given a Y/N choice of whether to print that file.

/SUFFIX=fspec

Allows you to specify a file that will be appended (as a suffix) to the file you are printing (override any SUFFIX option specified in the printer INI).

/SW:####

Provides an alternate way of passing switches. Instead of by name, you can pass the sum of the numeric switch values, as you would in the SWITCHES parameter of SPOOL.SBR/EZSPL.SBR. PRINT.LIT 3.0(123).

/W:##

When used in conjunction with the /HEADER option, defines the position of the "Page #" at the right side of the page header.

/?

Writes switch listing and usage info to the screen.

 

The technique for displaying the print queue and canceling a printout varies from one operating system to the next. Under Windows, you just use the Print Manager (generally accessible by double-clicking on the printer icon in the system tray at the end of the task bar). Under Linux, the typical equivalents are lpq and lprm. To execute these from the A-Shell dot prompt, just create a DO file which uses the HOST command (e.g. HOST lpstat –t). Also, most UNIX variations have a menu-driven or even GUI utility for doing these kinds of things.

History

2022 June, A-Shell 6.5.1717, PRINT.LIT 3.4(137):  Updated to fix a very old bug which would result in the directory listing being duplicated if there were consecutive DEVICE statements for the same device—i.e. one normal DEVICE definition and one or more PPN-specific definitions.

2019 June, A-Shell 6.5.1662, PRINT.LIT 3.4(134):  Updated to accommodate a change in maximum filename.ext size, from 10.3 to 72.8.

2018 November, A-Shell 6.5.1651, PRINT.LIT 3.3(131):  Updated to avoid a read-only error related to the smart-scrollback activation feature.