Please enable JavaScript to view this site.

A-Shell spoolers have names of one to six characters and are defined by means of an initialization file, normally abbreviated "ini" or "init," 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 ini 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 ini 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 directive in miame.ini. If there is no PRINTER directive, 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 ini files only specify interfacing information that can be processed at run time. Thus, any changes you make to a printer ini file will take effect with the next print request. Also, because the printer ini files are only processed when referenced by a print request, there is no harm in having printer ini 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 ini file can be a maximum length of 256 characters.

The exception to the rule requiring the existence of a printer ini 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.

Subtopics

Printer Ini File Examples

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software