Print Error Handling

For printing to printers not controlled via an OSDI or a high level print spooler such as DFPRINT, WINPRIN or the Unix/Linux lp), if a device goes off-line when an application is trying to print, the following message will probably appear, prompting the user for the next action:

DP4 System message 120. Origin: Operator error

Printer device port name not available.

               <Retry>

If the user hits the Esc key instead of pressing Retry, all printing to the printer will be aborted (printing to screen or file continues normally however).

For printing via a printer driver, the behaviour depends on the driver and will be handled by its user interface, not by QAB.

For printing via an OSDI error information is returned to the application in the print_error variable. The pr_error_mode variable can be set to determine how your program responds to a print error.

print_error

DP4 queries the OSDI for error an error code to application programs in the variable print_error.

To include this in field processing declare it as type I using any length. The value 0 is considered to mean no error. All other values indicate an error condition.

pr_error_mode

When a print error occurs the action of the program depends on the value of the variable pr_error_mode.

Value Interpretation
0 (default)  Report error and terminate program
1 Report error and continue program
2 Ignore error
2 Ignore error
3 If a hot key handler is available invoke it as though the user had pressed the hotkey given by Qpr_hotkey

The value 3 is used to allow a QAB program to provide an error handler that will