PRINT-DIRECT

Function

Writes directly to the print output file without using the Production Reporting page buffer.

Syntax

PRINT-DIRECT
[NOLF]
[PRINTER={LINEPRINTER|POSTSCRIPT|HPLASERJET|HTML|LP|PS|HP|HT}]
{txt_lit|_var|_col}...

Arguments

NOLF

Defines that no carriage return and line feed is to print. By default, printed text is followed by a carriage return and line feed character.

PRINTER

Type of printer to which this text applies.

txt_lit|_var|_col

Text to print.

Description

PRINT-DIRECT can be used for special applications that cannot be accomplished directly with PRINT commands, such as initializing a page with graphics or other special sequences. Since this text is often printer-dependent and since the report can be printed on different types of printers that require different control characters, you can use the PRINTER qualifier to specify the printer type. If no PRINTER qualifier is specified, the command applies to all printer types.

When using PRINT-DIRECT with PRINT, the Production Reporting page buffer is copied to the output file only when each page is full or when a NEW‑PAGE command is issued. One approach is to use PRINT‑DIRECT commands inside a BEFORE‑PAGE or AFTER-PAGE procedure (declared with the DECLARE‑PROCEDURE command), so they are coordinated with the information coming out of the page buffer.

Examples

print-direct  printer=ps  '%%Page: '  $page-number
print-direct  nolf  printer=lp  reset