Carriage Controls

A carriage control character is an instruction to the printer that determines how many lines to skip before printing the next line. Initially, all printers used a common set of carriage control commands to dictate how they would operate. This common set was established by ANSI, and is called ANSI carriage controls.

IBM created a second set of controls to provide expanded print capabilities called “machine codes” or “machine carriage controls”. Machine carriage controls are hexadecimal codes which, like ANSI carriage controls, occur in column 1 of the print stream.

Over time, more sophisticated printers added the ability to pre-program specific line positions to be associated with specific carriage control values. The printer could move to these line positions when a specific carriage control command occurred. The programmer could predefine positions on pre-printed forms and tell the printer to move to them without trying to count how many lines the printer had printed and thus how many it had to move. These controls are called channel controls and generally have the values 1 through 9 and A through C. IBM uses a file called a Forms Control Buffer (FCB) to associate positions with each of the channel control values.

The following table lists valid ANSI carriage control characters.

Table 1. ANSI Carriage Control Characters
ANSI Action
+ Print without spacing (overstrike).
Blank Space one line and print (single spacing).
0 Space two lines and print (double spacing).
- Space three lines and print (triple spacing).
1 Skip to the first line on a new page and print.
2 Skip to the line position defined as Channel 2 and print.
3 Skip to the line position defined as Channel 3 and print.
4 Skip to the line position defined as Channel 4 and print.
5 Skip to the line position defined as Channel 5 and print.
6 Skip to the line position defined as Channel 6 and print.
7 Skip to the line position defined as Channel 7 and print.
8 Skip to the line position defined as Channel 8 and print.
9 Skip to the line position defined as Channel 9 and print.
A Skip to the line position defined as Channel 10 and print.
B Skip to the line position defined as Channel 11 and print.
C Skip to the line position defined as Channel 12 and print.

The following table lists valid machine carriage control characters.

Table 2. Machine Carriage Control Characters
Machine Action
01 Print without spacing (overstrike).
09 Print and space one line (single spacing).
11 Print and space two lines (double spacing).
19 Print and space three lines (triple spacing).
89 Print, then skip to the first line on a new page.
91 Print, then skip to the line position defined as Channel 2.
99 Print, then skip to the line position defined as Channel 3.
A1 Print, then skip to the line position defined as Channel 4.
A9 Print, then skip to the line position defined as Channel 5.
B1 Print, then skip to the line position defined as Channel 6.
B9 Print, then skip to the line position defined as Channel 7.
C1 Print, then skip to the line position defined as Channel 8.
C9 Print, then skip to the line position defined as Channel 9.
D1 Print, then skip to the line position defined as Channel 10.
D9 Print, then skip to the line position defined as Channel 11.
E1 Print, then skip to the line position defined as Channel 12.
0B Space one line without printing.
13 Space two lines without printing.
1B Space three lines without printing.
8B Skip to the first line on a new page without printing.
93 Skip to the line position defined as Channel 2 without printing.
9B Skip to the line position defined as Channel 3 without printing.
A3 Skip to the line position defined as Channel 4 without printing.
AB Skip to the line position defined as Channel 5 without printing.
B3 Skip to the line position defined as Channel 6 without printing.
BB Skip to the line position defined as Channel 7 without printing.
C3 Skip to the line position defined as Channel 8 without printing.
CB Skip to the line position defined as Channel 9 without printing.
D3 Skip to the line position defined as Channel 10 without printing.
DB Skip to the line position defined as Channel 11 without printing.
E3 Skip to the line position defined as Channel 12 without printing.
03 No operation.

So, if the print stream were impact data with plus signs in column 1 of the data, we would specify our Input group <TYPE> tag as follows:

<TYPE> IMPACT ANSI