PRINT-DIRECT

Syntax

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

Description

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

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. Because this text is often printer-dependent and because 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 in conjunction with PRINT commands, be aware that the SQR 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 that they are coordinated with the information coming out of the page buffer.

Parameters

Parameter Description

NOLF

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

PRINTER

Specifies the type of printer to which this text applies.

{txt_lit | _var | _col}

The text to be printed.

Example

The following example shows the PRINT-DIRECT command:

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