A-Shell spoolers, like their AMOS counterparts, have names of one to six characters and are defined by means of an initialization (normally abbreviated "ini" or "init") file, which is a small text file containing various configuration parameters. Under AMOS, these files were named <printer>.INI and were stored in the SYS: directory. Although A-Shell supports that method and will find and process those ini files, the recommended and preferred method is to use files named <printer>.PQI which are stored in the ASHCFG: directory. The extension PQI stands for "Printer Queue Initialization" and was chosen to minimize the likelihood of conflict or confusion with other file extensions, as well as other types of ini files. The actual content of .PQI files and .INI files is identical.
The ersatz directory ASHCFG: is typically DSK0:[1,7] but can in fact be anything. By grouping the printer initialization files in a special directory (away from the standard release files) and by using a unique extension, it is easy to identify the available printer configurations on a system. However, when looking for a printer, if the ASHCFG:<printer>.PQI file is not found, A-Shell will continue to look for SYS:<printer>.INI as before.
To allow for a temporary override of the printer init file without actually modifying or changing the active one, A-Shell will first check for <printer>.PQI in the %TEMP% directory. So the complete search path is:
%TEMP%\<printer>.PQI
ASHCFG:<printer>.PQI
SYS:<printer>.INI
For example, if the application wants to spool to a printer called LASER1, then A-Shell will look for a printer init file called %TEMP%\LASER1.PQI or ASHCFG:LASER1.PQI or SYS:LASER1.INI which defines the configuration of that printer.
If no printer name is specified in the PRINT or XCALL SPOOL statement, the default name is determined by the PRINTER statement in the miame.ini file. If there is no PRINTER statement, under UNIX, A-Shell will look for a file $HOME/.PRINTER, from which the printer name will be read from the first line of the file, if found. If no default printer is defined, then A-Shell will attempt to print to the default printer for the host operating system environment.
Unlike AMOS, where the printer initialization files are processed at system boot up, A-Shell ignores these files until you actually make a print request. This is possible because the printer init files only specify interfacing information that can be processed at run time. Thus, any changes you make to a printer init file will take effect with the next print request. Also, because the printer init files are only processed when referenced by a print request, there is no harm in having printer init files that do not refer to actual or available printers.
There is no limit to the number of printer initialization files you may have. Thus, there is no limit to the number of logical A-Shell printers that may exist. There is also no limit to the number of logical A-Shell printers that may actually correspond to the same system spooler. Any given line in a printer init file can be a maximum length of 256 characters.
The exception to the rule requiring the existence of a printer init file is that it is possible to use the Windows or UNIX printer name directly, instead of the AMOS or A-Shell name. In that case, a default printer configuration will be used. For Windows, this consists of DEVICE = <printer>, PASSTHROUGH=OFF and PITCH=AUTO. Under UNIX is would simply be DEVICE = <printer>. This technique is particularly useful under Windows in conjunction the subroutine MIAMEX 120, Prompt for Window Printer, which allows the user to select a printer using the standard Windows printer selection dialog.
Examples of typical printer initialization files for Windows and UNIX are given in the following topic. Note that in all cases, the only mandatory parameter is DEVICE (or alternatively, COMMAND); all others are optional.