Following this introduction are sections on EZSPL Old Format, EZSPL New Format, and EZSPL Processing.
EZSPL.SBR is a very useful utility, which is fully compatible with and may be used in place of the SPOOL subroutine. In A-Shell, in fact, SPOOL is implemented as an alias to EZSPL. EZSPL provides three main functions:
• It incorporates a screen preview facility, enabling the user to browse through the document either before or instead of sending it to a printer. This feature has been fully implemented under A-Shell. In fact, the A-Shell version of the viewer (known as EZ-TYPE or, under its latest incarnation, EZ-VUE) supports many enhancements over the original version.
• It optionally provides a front-end printer selection, enabling the user to select the printer and various print options (such as banner, header, etc.). Many of the switches are specific to the AMOS environment, and so there is a fair amount of divergence here between the AMOS and A-Shell versions, but the concepts are similar and the differences can be handled in the configuration files, external to the application source code.
• It optionally provides transparent character translation through what it terms port filters. These enable programs written to generate escape sequences for specific printers to have their codes transparently modified to the sequences required for other printers as the documents are output.
Port filters are not implemented under A-Shell, but the equivalent functionality is available using either the COMMAND=SBX:<routine name> option in the printer initialization file, or traditional UNIX filters in the UNIX environment.
In addition to the above features, EZSPL, like SPOOL, performs the mundane task of sending the specified file to the specified print queue. Two calling formats are available, each described in the following topics, followed by t*he a brief discussion of the EZ-SPOOL configuration file processing.
SPOOL.SBR is handled by using the ALIAS facility in the A-Shell configuration file to redirect it to EZSPL.SBR, which supports a superset of the normal SPOOL.SBR capabilities.
History
2013 October, A-Shell 6.1.1373: SPOOL (or EZSPL) refinement: Under UNIX, spooling a print file that is still open does not generate any error or warning, but the spooled output may be truncated if the last block written hadn't been flushed to disk. To avoid this intolerable result that can nonetheless go without notice for an indefinite period, A-Shell now detects if the print file is still open, and if so, flushes its buffer to disk so the spooled output will be complete. It also logs a warning message to the ashlog.log file. It does not, however, close the print file, since that might lead to an I/O-to-unopened error if the file was closed later. And although that might be a good thing, forcing the underlying bug to be fixed, it's seldom appreciated when a new error occurs in a "working" program after installing an A-Shell update. Note that the issue didn't affect Windows because in that environment, attempting to spool an open file would generate an error.