DEFINE PRINTER ([logical-printer-name=]n)
|
|||||
[OUTPUT
operand1]
|
|||||
This document covers the following topics:
For an explanation of the symbols used in the syntax diagram, see Syntax Symbols.
Related Statements: AT END OF
PAGE
| AT TOP OF
PAGE
| CLOSE
PRINTER
| DISPLAY
| EJECT
| FORMAT
| NEWPAGE
|
PRINT
|
SKIP
|
SUSPEND IDENTICAL SUPPRESS
| WRITE
|
WRITE TITLE
|
WRITE TRAILER
Belongs to Function Group: Creation of Output Reports
The DEFINE PRINTER
statement is used to assign a symbolic
name to a report number and to control the allocation of a report to a logical
destination. This provides you with additional flexibility when creating output
for various logical print queues.
When this statement is executed and the specified printer is already
open, the statement will implicitly cause that printer to be closed. To
explicitly close a printer, however, you should use the
CLOSE PRINTER
statement.
Operand Definition Table:
Operand | Possible Structure | Possible Formats | Referencing Permitted | Dynamic Definition | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operand1
|
C | S | A | yes | no | ||||||||||||||
operand2
|
C | S | A | yes | no |
Syntax Element Description:
Syntax Element | Description | |
---|---|---|
(n) |
Printer Number (Report Number):
The report number Report number 0 indicates the output channel of the main report.
Only output statements such as |
|
logical-printer-name |
Logical Printer Name:
Optionally you can assign a logical name
Naming conventions for
|
|
OUTPUT
operand1 |
Printer Name:
If Additional reports can be assigned with the following names: |
|
Report
|
Function
|
|
DUMMY |
Output to be deleted. | |
INFOLINE |
Output to the Natural infoline. For details on
the infoline, see the Natural terminal command %X in the
Terminal Commands documentation. See also
Example 2.
|
|
SOURCE |
Output to the Natural source area. | |
PROFILE operand2 |
Name of Printer Control Characters Table:
With the Such a table is defined in the global configuration file. See Printer Profiles in the Configuration Utility documentation for details on how to set printer profiles. |
|
DISP
operand2 |
Disposition:
Maximum length of operand: 4 bytes. Possible values for
|
|
DEL |
The temporary spool file is deleted after its
content has been printed.
This is the default value. |
|
KEEP |
The temporary spool file is not deleted after its content has been printed. | |
HOLD |
The temporary spool file is neither deleted nor printed. | |
COPIES
operand3 |
Number of Copies:
|
/* PRINTER NAME DEFINED FOR WINDOWS * DEFINE PRINTER (REPORT1 = 1) OUTPUT 'LPT1' WRITE (REPORT1) 'REPORT 1 PRINTED ON PRINTER LPT1' END
** Example 'DPIEX1': DEFINE PRINTER ************************************************************************ * SET CONTROL 'XI+' /* SWITCH INFOLINE MODE ON SET CONTROL 'XT' /* INFOLINE TOP * DEFINE PRINTER (1) OUTPUT 'INFOLINE' WRITE (1) 'EXECUTING' *PROGRAM 'BY' *INIT-USER WRITE 'TEST OUTPUT' EJECT /* FORCE PHYSICAL I/O * SET CONTROL 'X' /* SWITCH BACK TO NORMAL * END
EXECUTING DPIEX1 BY HTR Page 1 05-01-13 14:54:33 TEST OUTPUT