Appendix G-1. EBCDIC control character definitions.

The EBCDIC control codes are defined in the IBM Corporate Standard, C-S 3-3220-002. Appendix G-1 contains an excerpt from the standard which includes the definition of each control character as well as supporting documentation which provides the user with additional information related to the definition and use of the control characters.

The EBCDIC control characters have been divided into eight major classifications based on their function. Each classification is described in section G-1.1 below and includes a list of those controls contained within the classification. Additionally, there are three unassigned and unclassified control codes which have been reserved for future use by IBM products.

G-1.1 Control character classification

Customer Use Control Characters

As the name suggests, these characters are used to designate customer assigned functions. These control characters must not be implemented on IBM products. (CU1, CU3)

Device Control Characters

These characters are used to control devices, or to control major functions of devices (CSP, DC1, DC2, DC3, DC4, MFA, POC, SA, SEL, SFE, WUS).

Error Control Characters

These characters are used for error control, for indicating alarms, or for identifying or requesting identification of stations in a communications system (ACK, BEL, CAN, DEL, ENQ, EO, NAK, SUB).

Formatting or Editing Control Characters

Characters in this classification group are used for formatting, or for editing data (BS, CR, DS, FF, FS, HT, IR, IT, LF, NBS, NL, PP, RFF, RNL, SBS, SOS, SPS, UBS, VT). Characters SP, NSP, RSP and SHY are special characters within this group. Additional information is provided with the specific control character definitions in section G-1.2 below.

Grouping Control Characters

These characters are used for grouping data or information. Depending on the actual control character, they may be at the start of the data, at the end of a data-block, at the start and end of a data-block (data-framing), at the end of communications control block or procedure, etc., (EM, EOT, ETB, ETX, IFS, IGS, IR, IRS, ITB/IUS, SOH, STX, TRN).

Mode Control Characters

These characters are used to set modes of operation, to change a mode of operation or to restore previous mode of operation (BYP/INP, DLE, ESC, GE, IT, RES/ENP, RPT, SI, SO, SM/SW).

Synchronization Control Characters

Characters in this classification group are used for synchronization of communications systems, or for synchronization of data within a format or for synchronization of data streams with certain timing characteristics of some device functions (EO, NUL, SYN).

Communication Control Characters

These characters (which also fall into the major function classifications above) are reserved exclusively for communications control (ACK, DLE, ENQ, EOT, ETB, ETX, IUS/ITB, NAK, SOH, STX, SYN). These controls must not be used for device control.

G-1.2 Control character definitions

Specific definitions for the control characters are given below. Each definition includes the control mnemonic, control name, hexadecimal code assignment and a brief description. Note that these are generalized descriptions. Specific architectures may give more complete implementation details.

NUL - Null (Hex 00)

A synchronization control character, with an all-zeros bit-pattern, which may serve to accomplish time and media fill.

SOH - Start of Heading (Hex 01)

A communication grouping control character which is used at the beginning of a sequence of characters which constitute a machine-sensible address or routing information. Such a sequence is referred to as the heading.

STX - Start of Text (Hex 02)

A communication grouping control character which precedes a sequence of characters that is to be treated as an entity and entirely transmitted to the ultimate destination. Such a sequence is referred to as the text. STX may be used to terminate a sequence of characters started by SOH.

ETX - End of Text (Hex 03)

A communication grouping control character which is used to terminate a sequence of characters started with STX and transmitted as an entity.

SEL - Select (Hex 04)

A device control character that is used with a one-byte parameter to control a function within a device.

HT - Horizontal Tab (Hex 05)

A formatting control character that moves the active position horizontally to the next tab stop setting.

RNL - Required New Line (Hex 06)

A formatting control character that causes a mandatory move of the active position to the starting margin on the next line. Required New Line resets Indent Tab mode.

DEL - Delete (Hex 07)

An error control character which erases characters on perforated tape. Delete may also apply to other devices such as displays.

GE - Graphic Escape (Hex 08)

A mode control character used to extend the standard graphic set of the code table. It is a non-locking shift character which changes the graphic meaning of the next single following bit-pattern.

SPS - Superscript (Hex 09)

A formatting control character that causes a fractional line feed vertically, bottom to top. The value of the fraction is less than one line and is equal to the corresponding Subscript movement.

RPT - Repeat (Hex 0A)

A mode control character that sets a mode of operation such as managing a printer buffer to allow a device to print repeatedly the character string contained in that buffer.

VT - Vertical Tab (Hex 0B)

A formatting control character that moves the active position vertically, to the next in a series of predetermined lines.

FF - Form Feed (Hex 0C)

A formatting control character that moves the active position to the starting margin on the first predetermined printing line on the next form or page.

CR - Carriage Return (Hex 0D)

A formatting control character that moves the active position to the starting margin on the same line.

SO - Shift Out (Hex 0E)

A mode control character that indicates the bit-patterns which follow shall be interpreted according to the most recently designated Shift Out set.

SI - Shift In (Hex 0F)

A mode control character that indicates the bit-patterns which follow shall be interpreted according to the most recently designated Shift In set.

DLE - Data Link Escape (Hex 10)

A communication mode control character which will change the meaning of a limited number of contiguously following characters. It is used exclusively to provide supplementary controls in data communication networks.

DC1 - Device Control 1 (Hex 11)

A device control character that controls ancillary devices associated with data processing or telecommunications systems.

DC2 - Device Control 2 (Hex 12)

A device control character that controls ancillary devices associated with data processing or telecommunications systems.

DC3 - Device Control 3 (Hex 13)

A device control character that controls ancillary devices associated with data processing or telecommunications systems.

RES/ENP - Restore/Enable Presentation (Hex 14)

A mode control character that terminates the Bypass/Inhibit Presentation mode of operation and activates associated printers or displays.

NL - New Line (Hex 15)

A formatting control character that moves the active position to the starting margin on the next line.

BS - Backspace (Hex 16)

A formatting control character that moves the active position horizontally to the next position in the reverse direction.

POC - Program Operator Communication (Hex 17)

A device control character that is used with two one-byte parameters to provide a communication protocol between end users. The first parameter defines the function and the second defines a unit associated with the function (for example, indicator light or function key).

CAN - Cancel (Hex 18)

An error control character that is used to indicate the data with which it is sent is in error or is to be disregarded.

EM - End of Medium (Hex 19)

A grouping control character associated with the transmitted data that may be used to identify physical end of medium, or the end of the used, or wanted, portion of information recorded on a medium. (The position of this character does not necessarily correspond to the physical end of the medium.)

UBS - Unit Backspace (Hex 1A)

A formatting control character that moves the active position horizontally in the reverse direction a fraction of the space used for a graphic. It is used, for example, for vertical alignment of line endings on a proportional spacing device.

CU1 - Customer Use 1 (Hex 1B)

A customer use control character sent into a system to designate a customer assigned function. This control character must not be implemented by IBM products.

IFS - Interchange File Separator (Hex 1C)

A grouping control character that terminates an information block called a FILE. (See definitions of IGS, IRS, IUS.)
When used in hierarchical order, the hierarchical order is ascending, IUS, IRS, IGS, IFS.
An information block must not be split by a higher order separator, for example, a RECORD may contain a whole number of UNITS, but may not contain a part of a UNIT.

IGS - Interchange Group Separator (Hex 1D)

A grouping control character that terminates an information block called a GROUP. (See definition of IFS, Interchange File Separator.)

IRS - Interchange Record Separator (Hex 1E)

A grouping control character that terminates an information block called a RECORD. (See definition of IFS, Interchange File Separator.)

IUS/ITB - Interchange Unit Separator, Intermediate Transmission Block (Hex 1F)

A grouping control character that terminates an information block called a UNIT. (See definition of IFS, Interchange File Separator). In Binary Synchronous Communications line control, this character is used to indicate the end of an intermediate block of data.

DS - Digit Select (Hex 20)

An editing control character that causes either a digit from the source field or a fill character to be inserted in the result field, in CPU editing operations.

SOS - Start of Significance (Hex 21)

An editing control character that causes either a digit from the source field or a fill character to be inserted in the result field, and also indicates, by setting a status indicator, that the following digits are significant in CPU editing operations.

FS - Field Separator (Hex 22)

An editing control character that identifies individual fields in a multiple field CPU editing operation.

WUS - Word Underscore (Hex 23)

A device control character that causes the entire word immediately preceding it to be underscored.

BYP/INP - Bypass/Inhibit Presentation (Hex 24)

A mode control character that deactivates the associated printers or displays and causes the succeeding control characters except the communication control characters and Restore/Enable Presentation to be ignored. Restore/Enable Presentation resets this mode.

LF - Line Feed (Hex 25)

A formatting control character that moves the active position vertically to the next line.

ETB - End of Transmission Block (Hex 26)

A communication grouping control character that indicates the end of a block of data for transmission purposes.

ESC - Escape (Hex 27)

A mode control character used to provide code extension in general information exchange. The Escape character itself is a prefix affecting the interpretation of a limited number of contiguously following characters.
Escape sequences are used to obtain additional control functions. Such control functions must not be used as additional communication controls.

SA - Set Attribute (Hex 28)

A device control character that indicates the beginning of a fixed length control sequence.
It is recommended that this control character not be implemented on future products, unless such products are required to provide compatibility with a previously announced product.
This control function can be provided by a CSP (hex 2B) control sequence.

SFE - Start Field Extended (Hex 29)

A device control character that indicates the beginning of a variable length control sequence.
It is recommended that this control character not be implemented on future products, unless such products are required to provide compatibility with a previously announced product. This control function can be provided by a CSP (hex 2B) control sequence.

SM/SW - Set Mode/Switch (Hex 2A)

A mode control character that sets a mode of operation such as switching between two print buffers during a print operation.

CSP - Control Sequence Prefix (Hex 2B)

A control character that indicates the beginning of a variable length control sequence. CSP sequences appear as:

CSP,CLASS,COUNT,TYPE,P1,P2,. . .,Pn.

where:

Class specifies a class or set of control functions which have a common purpose or attribute.
The binary count indicates the number of bytes to the end of the CSP sequence, including the count byte.
Minimum value of the count field is 2. If the count field is 2, then there is a type field and no parameter field. If the count field is 3 or larger, then the sequence must contain a type field and one or more parameter fields.
Type is a one-byte field; it specifies one control function within a class of control functions.
P1 . . . Pn are parameters. The length of each parameter depends upon the class and type fields.
The aggregate length of all the parameters may be in the range of 0 to 253.


MFA - Modify Field Attribute (Hex 2C)

A device control character that indicates the beginning of a variable length control sequence.
It is recommended that this control character not be implemented on future products, unless such products are required to provide compatibility with a previously announced product.
This control function can be provided by a CSP (hex 2B) control sequence.

ENQ - Enquiry (Hex 2D)

A communication control character that is used in data communication systems as a request for a response from a remote station. It may be used as a Who Are You (WRU) to obtain identification, or may be used to obtain station status, or both.

ACK - Acknowledge (Hex 2E)

A communication control character that is transmitted by a receiver as an affirmative response to a sender.

BEL - Bell (Hex 2F)

A control character that is used when there is a need to call for human attention. It may control alarm or attention devices, or cause a device to stop.

Reserved (Hex 30)

A control location reserved for assignment of future functions.

Reserved (Hex 31)

A control location reserved for assignment of future functions.

SYN - Synchronous Idle (Hex 32)

A communication synchronization control character that is used by a synchronous transmission system in the absence of any other character to provide a signal from which synchronism may be achieved or retained.

IR - Index Return (Hex 33)

As a formatting control character, it moves the active position to the starting margin on the next line. As a grouping control character, it terminates an information block called a unit.

PP - Presentation Position (Hex 34)

A formatting control character that is used with two one-byte parameters to move the active position. The first parameter defines the function and the second parameter is a binary number that denotes either a column or line number.

TRN - Transparent (Hex 35)

A grouping control character that is used with a one-byte parameter to denote the start of a transparent data stream. The parameter is a binary count of the number of bytes of transparent data not including the count byte.

NBS - Numeric Backspace (Hex 36)

A formatting control character that moves the active position horizontally, in the reverse direction, a distance equal to the space used for digits (0-9) in the pitch being used.

EOT - End of Transmission (Hex 37)

A communication grouping control character that is used to indicate the conclusion of a transmission.

SBS - Subscript (Hex 38)

A formatting control character that causes a fractional line feed vertically, top to bottom. The value of the fraction is less than one line and is equal to the corresponding Superscript movement.

IT - Indent Tab (Hex 39)

A mode control character that causes a Horizontal Tab to be executed immediately and following every subsequent New Line control character. This mode has the effect of indenting the starting margin. Multiple Indent Tabs may be used for greater indentation. Indent Tab mode is reset by Required New Line or Required Form Feed.

RFF - Required Form Feed (Hex 3A)

A formatting control character that causes a mandatory move of the active position to the starting margin of the first line of the next page. Required Form Feed resets Indent Tab mode.

CU3 - Customer Use 3 (Hex 3B)

A customer use control character sent into a system to designate a customer assigned function. This control character must not be implemented by IBM products.

DC4 - Device Control 4 (Hex 3C)

A device control character that controls ancillary devices associated with data processing or telecommunications systems, more especially switching devices on or off. (If a single stop control is required to interrupt or turn off ancillary devices, DC4 is the preferred assignment.)

NAK - Negative Acknowledge (Hex 3D)

A communication control character that is transmitted by a receiver as a negative response to the sender.

Reserved (Hex 3E)

A control location reserved for assignment of future functions.

SUB - Substitute (Hex 3F)

A control character that replaces a character that is determined to be invalid or in error, or, for graphic display devices is inserted at the end of a message to signify that some character or characters in the message are invalid.

EO - Eight Ones (Hex FF)

A synchronization control character, with an all-ones bit-pattern, which may serve to accomplish time and media fill.

G-1.3 Special graphic characters

Code points with hexadecimal reference numbers from 40 through FE inclusive are reserved for assignment of graphic characters. Four of these code points are often used for special characters which have the characteristics of control characters. Code Point hexadecimal reference number 40 is always assigned to the Space Character which is required in all EBCDIC code pages. The Required Space (RSP), Numeric Space (NSP), and Syllable Hyphen (SHY) coded graphic characters are optional, but when used, the preferred hexadecimal code points are: RSP (hexadecimal 41), NSP (hexadecimal E1), and SHY (hexadecimal CA). Definitions of these graphic characters are included below.

SP - Space (Hex 40)

A normally non-printing graphic character used to separate words. It is also a formatting character that moves the active position horizontally one position in the forward direction. This character can be eliminated by products that adjust text.

RSP - Required Space (preferred Hex 41)

A normally non-printing graphic character used to separate words. It is also a formatting character that moves the active position horizontally one position in the forward direction. This character cannot be eliminated by products that adjust text.

NSP - Numeric Space (preferred Hex E1)

A normally non-printing graphic character, on products with proportional spacing. It is also a formatting character that moves the active position horizontally a distance in the forward direction equal to the width of a numeric character.

SHY - Syllable Hyphen (preferred Hex CA)

A hyphen graphic character used at the end of a line after the syllable of a word that must be split onto the next line. This character can be eliminated by products that adjust text.