PRTCHK

xcall PRTCHK, printer, rtncde

Under AMOS, PRTCHK.SBR may be used both to check for the existence of a printer, and to check whether a particular file is being printed. The A-Shell implementation contains only the first function, due to the limitations of either the spooling systems, or the interfaces to those spooling systems, of the operating systems on which it runs.

Parameters

printer  (String)  [in]

A-Shell spooler name to check

rtncde  (F or String)  [in/out]

For type F, returns zero if the printer is found, else one. For type S, returns "F" if the printer is found. To be certain of the result, you should preset the variable to some other value first. Note that "found" means only confirmation of the logical existence of the spooler—i.e. the routine tests whether a corresponding printer ini file (dsk0:printer.ini[1,4] or dsk0:printer.pqi[1,7]) exists.

Apparently some versions of PRTCHK.SBR work the opposite way, returning 1 if the printer is found and 0 if it is not. To get this behavior, add SBR=PRTCHK1 to miame.ini. This option only applies when rtncde is a floating point variable.