BARR/RJE manual

Appendix B. ASCII and EBCDIC Standards

Computers use a coding system to define the correspondence between the graphic symbols we see on paper and on screen and the hexadecimal codes manipulated in the computer. Graphics include letters, numbers, punctuation, and other symbols. The PC and the mainframe each use a different coding system to represent these symbols.

The PC uses the ASCII (American Standard Code for Information Interchange) coding system. ASCII codes are defined in the American Standard Code for Information Interchange publication ANSI X3.4-1986 from the American National Standards Institute, Inc.

The mainframe uses the EBCDIC (Extended Binary-Coded Decimal Interchange Code) coding system. EBCDIC codes are defined in the IBM publication, System 370 Reference Summary (GX20-1850).

Both the ASCII and EBCDIC standards include control codes that do not have a graphic representation. These codes are used for control functions by printers and communication protocols. In the coding standards, the control codes are represented symbolically by two- and three-character abbreviations. For example, the control code for End of Transmission is represented as EOT.

Data Translation – When data is transferred between the mainframe computer and the remote PC, it must be translated to the appropriate coding system so that the graphic symbols can be viewed, printed, or written to disk.

Translation tables in the BARR/RJE Installation Description control the translation of symbols between EBCDIC and ASCII.

When data is sent from the PC to the mainframe, BARR/RJE must translate the data from ASCII to EBCDIC. When data from the mainframe is received by the PC, the opposite translation, from EBCDIC to ASCII, must be made.

RJE+3270: Data translation for RJE sessions is different than data translation for 3270 sessions. See your 3270 for RJE manual for information about 3270 data translation.


B.1 Sending ASCII Data

BARR/RJE translates from the ASCII to the EBCDIC character set when you send data to the mainframe.

Each ASCII line ends with the carriage return character. BARR/RJE discards line feed (LF), form feed (FF), and delete (7F) characters before it sends the data. Horizontal tab (HT) characters produce the standard spacing assumed by the IBM PC.

Section B.4 describes the ASCII-to-EBCDIC translation table.

B.2 Receiving ASCII Data

The host computer sends EBCDIC files. BARR/RJE translates the data in each line from EBCDIC to ASCII. Section B.5 describes the EBCDIC-to-ASCII translation tables.

Each line received from the host computer provides line feed and carriage control information as described in the following table:

Spacing information received

ASCII codes produced

Space 0 lines

CR (overprint)

Space 1 line

CR LF

Space 2 lines

CR LF CR LF

Space 3 lines

CR LF CR LF CR LF

Skip to stop 1

FF to start new page

Skip to stop 2-9, A, B, C

CR LF to advance to line indicated

B.3 EBCDIC and ASCII Translation

During data translation, BARR/RJE converts the representation for a symbol in one coding system to the representation for that symbol in the other coding system. In many cases, an identical symbol exists in both coding systems so translation is straightforward. For example, the letter A is represented as hexadecimal 41 in ASCII and C1 in EBCDIC.

In a few cases, an identical symbol does not exist in both coding systems but an equivalent character can be substituted. For example, the EBCDIC logical not (¬) symbol is represented by the ASCII circumflex (^), the alternate representation for this symbol.

In other cases, an equivalent symbol does not exist because all the graphic symbols do not appear in both the ASCII and EBCDIC coding systems. In these cases, the software substitutes a question mark (?) for the symbols. For example, the EBCDIC hexadecimal 62 does not have an equivalent representation in ASCII. When BARR/RJE converts from EBCDIC to ASCII, it substitutes an ASCII question mark (hexadecimal 3F) for hexadecimal 62.

Three Translation Tables – BARR/RJE has three translation tables: one ASCII-to-EBCDIC table and two EBCDIC-to-ASCII tables. The two EBCDIC-to-ASCII tables differ slightly. The table differences allow you to use different translations for different devices. For example, you can use different translations on the printer and punch streams.

To help you distinguish between the two EBCDIC tables, the tables are labeled table one and table two on your screen.

Translation of Control Codes – The BARR/RJE default translation tables do not translate any control codes. Instead, BARR/RJE substitutes question marks (?) for control codes. (Translate control codes to Question marks is the default option.)

If necessary, you can alter the translation tables to suit your application by using the Translate control codes to Control codes option. This option alters the following entries:

00-1F and 80-9F of ASCII to EBCDIC Table One
00-3F
of EBCDIC to ASCII Table One
00-3F
of EBCDIC to ASCII Table Two

See section 18.1 for more information about modifying the translation tables.

The tables in sections B.4 and B.5 show the ASCII-to-EBCDIC and EBCDIC-to-ASCII translations that are made when you select the Translate control codes to Control codes option. The differences between Table One and Table Two are listed below each table. (The default tables used when you select Translate Control Codes to Question Marks are not shown in this appendix.)

The differences between EBCDIC to ASCII Table One and EBCDIC to ASCII Table Two are listed below the table in section B.5.

Extended ASCII Codes – For the ASCII to EBCDIC tables, Translate control codes to Control codes allows you to use Extended ASCII codes for 80-FF. On the PC keyboard, you can display extended ASCII characters by holding ALT and typing the decimal code for the symbol. See the ASCII code pages in your DOS manual for a list of ASCII symbols and their decimal codes.

B.4 ASCII-to-EBCDIC Translation Table

When you select Translate control codes to Control codes , the ASCII to EBCDIC table in the software matches the table above. Column one contains the ASCII hexadecimal codes for the graphic or control symbol in column three. Column two contains the EBCDIC codes for the same graphic symbol. The right half of the table (80-FF) is a copy of the left half (00-7F), which causes the parity bit to be ignored during translation between ASCII and EBCDIC.

B.5 EBCDIC-to-ASCII Translation Table

When you select Translate control codes to Control codes , Table One matches the table above. Column one contains the EBCDIC hexadecimal codes for the graphic or control symbol in column three. Column two contains ASCII codes for the same graphic symbol. The double question marks (??) in column two indicate characters not available in ASCII. These characters will be translated to an ASCII question mark (?).

The following list shows how Table Two differs from Table One. The differences occur when you select either Translate control codes to Control codes or Translate control codes to Question marks.

If your printer supports these symbols, using Table Two makes the symbols print on the PC the same way as on the mainframe. Most PC printers support printing these characters.

B.6 Legend of Characters

These characters and symbols display in the translation tables (B.4 and B.5).

Control Characters

Control Characters

ACK

Acknowledge

MFA

Modify Field Attribute

BEL

Bell

NAK

Negative Acknowledge

BS

Backspace

NBS

Numeric Backspace

BYP

Bypass

NL

New Line

CAN

Cancel

NUL

Null

CR

Carriage Return

POC

Program-Operator Communication

CSP

Control Sequence Prefix

PP

Presentation Position

CU1

Customer Use 1

RES

Restore

CU3

Customer Use 3

RFF

Required Form Feed

DC1

Device Control 1

RNL

Required New Line

DC2

Device Control 2

RPT

Repeat

DC3

Device Control 3

RS

Record Separator

DC4

Device Control 4

SA

Set Attribute

DEL

Delete

SBS

Subscript

DLE

Data Link Escape

SEL

Select

DS

Digit Select

SFE

Start Field Extended

EM

End of Medium

SI

Shift In

ENQ

Enquiry

SM

Set Mode

EO

Eight Ones

SO

Shift Out

EOT

End of Transmission

SOH

Start of Heading

ESC

Escape

SOS

Start of Significance

ETB

End of Transmission Block

SPS

Superscript

ETX

End of Text

STX

Start of Text

FF

Form Feed

SUB

Substitute

FS

File Separator

SYN

Synchronous Idle

GE

Graphic Escape

TRN

Transparent

GS

Group Separator

UBS

Unit Backspace

HT

Horizontal Tabulation

US

Unit Separator

IR

Index Return

VT

Vertical Tabulation

IT

Indent Tab

WUS

Word Underscore

LF

Line Feed

 

 

 

Graphic Characters

Graphic Characters

SP

Space (Normally Nonprinting)

<

Less Than

!

Exclamation Point

=

Equals

"

Quotation Marks (Diaeresis)

>

Greater Than

#

Number Sign

?

Question Mark

$

Dollar Sign

@

Commercial At

%

Percent Sign

A...Z

Uppercase Latin Letters

&

Ampersand

[]

Opening, Closing Bracket

Apostrophe (Closing Single Quotation Mark; Acute Accent)

\

Reverse Slant

(

Opening Parenthesis

^

Circumflex

)

Closing Parenthesis

_

Underline

*

Asterisk

Opening Single Quotation Mark (Grave Accent)

+

Plus

a...z

Lowercase Latin Letters

,

Comma (Cedilla)

{}

Opening, Closing Braces

-

Hyphen (Minus)

¦

Vertical Line (EBCDIC only)

.

Period (Decimal Point)

~

Tilde

/

Slant

¢

Cent (IBM Extension)

0...9

Digits 0 through 9

¬

Logical Not (IBM Extension)

:

Colon

|

Logical Or (IBM Extension)

;

Semicolon