IBM Machine Code Printer Control Characters

Last updated

Early mainframe printers were usually line printers. Line printers provide a limited set of commands to control how the paper is advanced when print lines are printed. The application writing reports, list, etc. to be printed has to include those commands in the print data. These single character print commands are called printer control characters.

Contents

Introduction into Print Control Characters

Printer control characters and Carriage control characters are IBM mainframe terms that denote the special meaning which the first character on a line of printable text may have. The first character of each line of text is interpreted as a control character or printer command instead of a character to be printed if a corresponding attribute is set for the print data set (data set is mainframe speak for what is known as a file on other operating systems).

How Printer Control Characters work

While mostly replaced by an electronic versions later on, line printers initially used a loop of punched paper tape to control the movement of the paper while printing. This tape is called a carriage control tape and is mounted on the printer. The looped carriage tape moves synchronously with the stream of fanfold paper.

The line printers have 12 sensors to recognize 12 independent positions on the carriage control tape. Each position is called a channel, numbered from 1 to 12. If a hole is punched in a channel, then this hole marked a position on the page that the printer can 'jump to' quickly by advancing until the hole is sensed by the corresponding channel sensor. This is called skip to channel number n.

Commands are implemented so that each of the 12 channels can be jumped to. Instead of having to write empty print lines, applications can simply jump to a predefined channel if nothing is to be written between the current position and the target position, a huge performance gain at that time.

In addition to those skip to channel commands, there are other commands that the printer interprets to either stay at the current line or to space one, two, or three lines. By staying on the current line, one can create:

Instructing the printer to skip to a channel which is not punched will cause the printer to continue to feed paper at high speed. This might be caused by a mismatch between the tape installed and the one the application expects.

Special Meaning of Channel 1

By convention the position on a sheet of paper where the first print line has to be written is associated with Channel 1. For example, if the first line of text has to always be on physical line 3 for a given form, then the channel 1 hole has to be punched in line 3 of the carriage control tape.

By convention, IBM mainframe applications always jump to channel 1 when beginning a new logical page.

Channel 12 is less common, but usually indicates a line on the page where a footer can be printed.

Types of Printer Control Characters

Print data sets on IBM mainframe operating systems may have either of two variants of printer control characters:

The attribute for specifying the presence of print control characters is part of the Record Format (aka RECFM) attribute must therefore allow for two variants:

ASA Control Characters

ASA control characters are logical printer commands. They tell the printer how far to advance the paper before printing the current line of text. ASA control characters are all displayable characters. Printers do not understand these characters themselves, therefore the printer driver must translate them to the corresponding printer commands when sending the print data to the printer.

IBM Machine Control Characters

Machine control characters, in contrast, are the hardware commands which IBM line printers understand. This is why they are hardware dependent or hardware determined. IBM defined this set of commands for their line printers and made sure all their line printers understand them. Other (mainframe) line printer manufacturers also had to make sure their printers understood those commands. Since machine control characters are hardware commands, many of them are not displayable characters and therefore machine control characters are always specified as hexadecimal values.

Main difference between ASA and Machine Control Characters

The main difference between the two sets of printer control characters might be the portability of ASA control characters versus the hardware dependency of machine control characters. The fact that the ASA controls were space before write, while the machine controls were space after write could require some data streams to be converted.

Language support for printer control

Many programming languages simply place the desired control character in the first byte of the line to be printed. COBOL and PL/I also have a system-independent method of specifying printer controls. The compiler or run-time will translate these options into the appropriate control character.

COBOL

COBOL uses the syntax WRITE record-name AFTER ADVANCING n Lines., where record-name is the name of the area containing the line and n is the number of lines. Additionally BEFORE ADVANCING can be used or BEFORE|AFTER ADVANCING TOP to skip to the top of a new page. [1]

PL/I

PL/I uses the syntax PUT SKIP(n) ... to skip n lines before printing, or PUT PAGE ... to skip to a new page.

List of IBM Machine Print Control Characters

IBM defined two sets of printer commands, and therefore two sets of printer control characters are available. The first set of commands did not send any data to be printed to the printer but only a paper movement instruction. These are called immediate commands. The second set of commands send data to be printed on the current line plus a paper movement instruction to the printer. Note that in contrast to the ASA control characters, the IBM machine print control characters ask the printer to firstly print the data on the current line, and then secondly advance the paper.

Immediate commands

These commands do not send any data to the printer. The commands only ask the printer to advance the paper.

Control CodeAction
x'03'No operation.
x'0B'Space 1 line immediate
x'13'Space 2 line immediate
x'1B'Space 3 line immediate
x'8B'Skip to channel 1 immediate
x'93'Skip to channel 2 immediate
x'9B'Skip to channel 3 immediate
x'A3'Skip to channel 4 immediate
x'AB'Skip to channel 5 immediate
x'B3'Skip to channel 6 immediate
x'BB'Skip to channel 7 immediate
x'C3'Skip to channel 8 immediate
x'CB'Skip to channel 9 immediate
x'D3'Skip to channel 10 immediate
x'DB'Skip to channel 11 immediate
x'E3'Skip to channel 12 immediate

Write and Space Commands

Write and space commands ask the printer to write the data on the line and afterwards move the paper.

Control codeAction
x'01'Write without spacing
x'09'Write and space 1 line
x'11'Write and space 2 lines
x'19'Write and space 3 lines
x'89'Write and skip to channel 1
x'91'Write and skip to channel 2
x'99'Write and skip to channel 3
x'A1'Write and skip to channel 4
x'A9'Write and skip to channel 5
x'B1'Write and skip to channel 6
x'B9'Write and skip to channel 7
x'C1'Write and skip to channel 8
x'C9'Write and skip to channel 9
x'D1'Write and skip to channel 10
x'D9'Write and skip to channel 11
x'E1'Write and skip to channel 12

See also

Related Research Articles

<span class="mw-page-title-main">IBM 3270</span> Family of block-oriented display terminals and printers made by IBM

The IBM 3270 is a family of block oriented display and printer computer terminals introduced by IBM in 1971 and normally used to communicate with IBM mainframes. The 3270 was the successor to the IBM 2260 display terminal. Due to the text color on the original models, these terminals are informally known as green screen terminals. Unlike a character-oriented terminal, the 3270 minimizes the number of I/O interrupts required by transferring large blocks of data known as data streams, and uses a high speed proprietary communications interface, using coaxial cable.

<span class="mw-page-title-main">Line printer</span> Impact printer that prints one entire line of text at a time

A line printer prints one entire line of text before advancing to another line. Most early line printers were impact printers.

<span class="mw-page-title-main">IBM 1401</span> 1960s decimal computer

The IBM 1401 is a variable-wordlength decimal computer that was announced by IBM on October 5, 1959. The first member of the highly successful IBM 1400 series, it was aimed at replacing unit record equipment for processing data stored on punched cards and at providing peripheral services for larger computers. The 1401 is considered by IBM to be the Ford Model-T of the computer industry due to its mass appeal. Over 12,000 units were produced and many were leased or resold after they were replaced with newer technology. The 1401 was withdrawn on February 8, 1971.

<span class="mw-page-title-main">Newline</span> Special characters in computing signifying the end of a line of text

A newline is a control character or sequence of control characters in character encoding specifications such as ASCII, EBCDIC, Unicode, etc. This character, or a sequence of characters, is used to signify the end of a line of text and the start of a new one.

<span class="mw-page-title-main">Computer terminal</span> Computer input/output device for users

A computer terminal is an electronic or electromechanical hardware device that can be used for entering data into, and transcribing data from, a computer or a computing system. The teletype was an example of an early-day hard-copy terminal and predated the use of a computer screen by decades. Starting in the mid-1970s with machines such as the Sphere 1, Sol-20, and Apple I, terminal circuitry began to be integrated into personal and workstation computer systems, with the computer handling character generation and outputting to a CRT display such as a computer monitor or, sometimes, a consumer TV.

Job Control Language (JCL) is a name for scripting languages used on IBM mainframe operating systems to instruct the system on how to run a batch job or start a subsystem. The purpose of JCL is to say which programs to run, using which files or devices for input or output, and at times to also indicate under what conditions to skip a step. Parameters in the JCL can also provide accounting information for tracking the resources used by a job as well as which machine the job should run on.

<span class="mw-page-title-main">IBM 1130</span> 16-bit IBM minicomputer introduced in 1965

The IBM 1130 Computing System, introduced in 1965, was IBM's least expensive computer at that time. A binary 16-bit machine, it was marketed to price-sensitive, computing-intensive technical markets, like education and engineering, succeeding the decimal IBM 1620 in that market segment. Typical installations included a 1 megabyte disk drive that stored the operating system, compilers and object programs, with program source generated and maintained on punched cards. Fortran was the most common programming language used, but several others, including APL, were available.

Disk Operating System/360, also DOS/360, or simply DOS, is the discontinued first member of a sequence of operating systems for IBM System/360, System/370 and later mainframes. It was announced by IBM on the last day of 1964, and it was first delivered in June 1966. In its time, DOS/360 was the most widely used operating system in the world.

<span class="mw-page-title-main">IBM 1403</span> High speed line printer, introduced in 1959 and used into the 1970s

The IBM 1403 line printer was introduced as part of the IBM 1401 computer in 1959 and had an especially long life in the IBM product line.

<span class="mw-page-title-main">IBM 1132</span> Line printer, part of the IBM 1130 computer system

The IBM 1132 line printer was the normal printer for the IBM 1130 computer system. It printed 120 character lines at 80 lines per minute. The character set consisted of numbers, upper-case letters and some special characters.

<span class="mw-page-title-main">Uniscope</span>

Uniscope was a class of computer terminals made by Sperry Rand Corporation, Univac Division, and successors since 1964 that were normally used to communicate with Univac mainframes. As such, it was the successor to various models of Teletype. Due to the text color on the original models, these terminals are informally known as green screen terminals.

KDF8 was an early British computer built by English Electric as a version of the RCA 501. By producing a software-compatible system, the intention was to reduce time and cost to develop software. However, the lengthy process of developing manufacturing capability meant that the system was soon outpaced by systems from other vendors. Only a few systems were sold during its 5 years of production. Due to the consolidation of the British computer industry, English Electric's computer division became one of the components of what would become ICL.

ASA control characters are simple printing command characters used to control the movement of paper through line printers. These commands are presented as special characters in the first column of each text line to be printed, and affect how the paper is advanced before the line is printed. The remainder of the line is printed starting in the first printable position.

<span class="mw-page-title-main">Computer programming in the punched card era</span> History of computer programming using punch cards

From the invention of computer programming languages up to the mid-1970s, most computer programmers created, edited and stored their programs line by line on punch cards.

<span class="mw-page-title-main">CPT Corporation</span> Producer of word processing machines

CPT Corporation was founded in 1971 by Dean Scheff in Minneapolis, Minnesota, with co-founders James Wienhold and Richard Eichhorn. CPT first designed, manufactured, and marketed the CPT 4200, a dual-cassette-tape machine that controlled a modified IBM Selectric typewriter to support text editing and word processing.

<span class="mw-page-title-main">Carriage control tape</span> Loop of punched tape used to synchronize fast vertical page motion in line printers

A carriage control tape was a loop of punched tape that was used to synchronize rapid vertical page movement in most IBM and many other line printers from unit record days through the 1960s. The tape loop was as long as the length of a single page. A pin wheel moved the tape accurately using holes in the center of the tape. A hole punched in one of the other channels represented a particular position on the page. Channel one was typically used to indicate the top of the page and might be the only channel used. Another channel might indicate the summary line on an invoice, enabling rapid skipping to that line. IBM provides a special manual punch that allowed accurate placement of the channel punches. Skipping occurred under computer control, but a form feed switch on the printer control panel allowed a manual skip to the top of the page. The tapes could be easily changed when new, continuously fed forms were loaded into the printer.

IBM 3740 Data Entry System was a data entry system that was announced by IBM in 1973. It recorded data on an 8" diskette, a new recording medium from IBM, for fast, flexible, efficient data entry to either high-production, centralized operations or to decentralized, remote operations. The "Diskette" was more commonly known as an 8-inch floppy disk.

<span class="mw-page-title-main">IBM 1443</span> Medium speed line printer

The IBM 1443 Printer is an obsolete computer line printer used in the punched card era. It was offered in three models: Models 1, 2 and N1; the last two could print up to 240 lines per minute (LPM) with a full character set.

The IBM 5280 was designed to compete with the data entry products that were available at the time. The IBM 3740 was the major data entry capability available to convert the data collected at the source, whether high volume, distributed or locally gathered, to make it available in digitized form in databases that were available to the managers and other users, and to make sure that the information was saved securely in storage for future reference. The IBM 5280 followed the design lead of the IBM 3740 but was totally programmable, enhanced the speed and storage of the processor, the speed and amount of available memory for the software to use, the size and clarity of the display, and afforded multiple diskette drives with larger capacity on each diskette. And, it sported an enhanced styling.

References

  1. IBM Corporation (August 2009). Enterprise COBOL for z/OS Language Reference (PDF). pp. 478–482. Retrieved June 30, 2020.