Try OpenEdge Now
skip to main content
Managing ABL Applications
ABL and R-code Deployment and Management : Managing Print Devices : Configuring a printer

Configuring a printer

Many printers have a set of control sequences that you can use to specify different print characteristics, such as compressed printing or italics typeface. These control sequences often involve special characters that can be represented by their octal (base 8) equivalent. To denote these octal codes, precede the three octal digits with an escape character. On UNIX, the escape character is a tilde (~) or a backslash (\). The following table lists the standard control sequences using a tilde as the escape character.
Table 29. Standard printer control sequences
Interpreted as
Single character
Use to send a single character to the printer, where nnn is an octal code between 000 and 377. You must specify all three digits.
Tab character
Use to send the 011 octal code to the printer.
Carriage return
Use to send the 015 octal code to the printer.
Line feed
Use to send the 012 octal code to the printer.
Use to send the 033 octal code to the printer.
Use to send the 010 octal code to the printer.
Form feed
Use to send the 014 octal code to the printer.
Use within quoted strings as an alternative to two quotes ("").
Use to send the backslash character to the printer.
Use to send the tilde character to the printer.
The PUT statement with the CONTROL option allows you to specify a control sequence that you want to send to a printer. The PUT statement has the following syntax:


PUT [ STREAM stream-name]
CONTROL "ctrl-sequence" "ctrl-sequence" ...
In the following example, the control sequence ~017 turns on the compressed printing feature of the current print device:
The control sequences sent to the output destination do not affect the current line, page counters, and positions maintained within OpenEdge. For more information about the PUT CONTROL statement, see OpenEdge Development: ABL Reference.
* Creating a printer-control table