Uses the values stored in system memory variables to control a printing operation.

Syntax

PRINTJOB
<statements>

ENDPRINTJOB

<statements>

Any valid dBL statements.

Description

Use PRINTJOB...ENDPRINTJOB to control a printing operation with the values of the system memory variables _pbpage, _pepage, _pcopies, _peject, and _plineno. When dBASE Plus begins executing PRINTJOB, it does the following:

  1. Closes the current print document (if any) and begins a new one, as if you had issued CLOSE PRINTER before issuing PRINTJOB

  2. Ejects a page if _peject is set to "BEFORE" or "BOTH"

  3. Sets _pcolno to 0

When dBASE Plus reaches ENDPRINTJOB, it does the following:

  1. Ejects a page if _peject is set to "AFTER" or "BOTH"

Before using PRINTJOB...ENDPRINTJOB, set the relevant system memory variables and issue SET PRINTER ON. After ENDPRINTJOB, use CLOSE PRINTER to close and print the document.