BARR/3270 manual

Appendix B. ASCII and EBCDIC Tables

The PC uses the ASCII (American Standard Code for Information Interchange) coding system to define the correspondence between the graphic symbols we see on the paper and on the screen to the hexadecimal codes manipulated in the computer. The mainframe assumes the EBCDIC (Extended Binary-Coded Decimal Interchange Code) coding system between the graphic symbols and the hexadecimal codes used in the computer.

Both the ASCII and EBCDIC standards include control codes that do not have a graphic representation. They are used for control functions by printers and communication protocols. The control codes are represented symbolically by two- and three-character abbreviations. For example,

EOT End of Transmission.

To send files from the PC to the central computer, BARR/3270 must translate the codes from ASCII to EBCDIC. When receiving files from the central computer, BARR/3270 must translate the files from EBCDIC to ASCII so that the graphics are correct for printing or writing to disk.


B.1 Sending ASCII Files

ASCII files translate to EBCDIC files when transmitted by BARR/3270.

Each ASCII line ends with the carriage return character. Line Feed (LF), Form Feed (FF), and Delete (7F) characters are discarded. Horizontal Tab (HT) characters produce the standard spacing assumed by the IBM PC.

BARR/3270 translates from the ASCII character set to the EBCDIC character set; see Section B.4 ASCII-to-EBCDIC Translation Table for a description.

B.2 Receiving ASCII Files

The central host sends files in EBCDIC. The data in each line is translated from EBCDIC to ASCII as described in Section B.5 EBCDIC-to-ASCII Translation Table.

Each line received from the central host 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 lines

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

Tables control the translation between EBCDIC and ASCII. Translating all codes from ASCII to EBCDIC is not possible because not all graphics appear in both coding systems. The same is true for translation from EBCDIC to ASCII. In cases where no equivalent graphic exists, a question mark is substituted. The Logical not is represented in the EBCDIC table in Section B.5 by the circumflex ^, which is the alternate representation for this symbol in ASCII.

The default tables in the BARR/3270 program do not translate any control codes. Instead, question marks ? are substituted for them. By selecting the Translate control codes option, the translate tables can be altered so that control codes are translated.

B.4 ASCII-to-EBCDIC Translation Table

The ASCII codes are defined in the American National Standard Code for Information Interchange publication ANSI X3.4-1986 from the American National Standards Institute, Inc., 1430 Broadway, New York, NY 10018. The ASCII column contains hexadecimal codes that are associated with a graphic or control symbol given in the third column. EBCDIC codes are obtained by matching for the same graphic in the IBM EBCDIC standard. The right half of the table is a copy of the left half. This causes the parity bit to be ignored in translation between ASCII and EBCDIC.

B.5 EBCDIC-to-ASCII Translation Table

The EBCDIC codes are defined in the IBM publication, System 370 Reference Summary, GX20-1850. The EBCDIC column contains hexadecimal codes that are associated with a graphic or control symbol given in the third column. The ?? shows characters not available in ASCII. These will be translated to ASCII ?.

The EBCDIC-to-ASCII Tables (B.5) can control EBCDIC-to-ASCII translation on printer and punch streams. The following changes have been made to Table 2 compared to Table 1.

Legend

Graphic

EBCDIC-to-ASCII

Keyboard

Vertical Line

6A 7C

Logical Or

|

4F B3

Alt-1-7-9

Logical Not

5F AA

Alt-1-7-0

Cent sign

4A 9B

Alt-1-5-5

If your printer supports these symbols, using Table 2 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

Control

Characters

Graphic

Characters

NUL

Null

SP

Space (Normally Nonprinting)

SOH

Start of Heading

!

Exclamation Point

STX

Start of Text

"

Quotation Marks (Diaeresis)

ETX

End of Text

#

Number Sign

EOT

End of Transmission

$

Dollar Sign

ENQ

Enquiry

%

Percent Sign

ACK

Acknowledge

&

Ampersand

BEL

Bell

Apostrophe (Closing Single Quotation Mark; Acute Accent)

BS

Backspace

(

Opening Parenthesis

HT

Horizontal Tabulation

)

Closing Parenthesis

LF

Line Feed

*

Asterisk

VT

Vertical Tabulation

+

Plus

FF

Form Feed

,

Comma (Cedilla)

CR

Carriage Return

-

Hyphen (Minus)

SO

Shift Out

.

Period (Decimal Point)

SI

Shift In

/

Slant

DLE

Data Link Escape

9

Digits 0 through 9

DC1

Device Control 1 0

:

Colon

DC2

Device Control 2

;

Semicolon

DC3

Device Control 3

<

Less Than

DC4

Device Control 4

=

Equals

NAK

Negative Acknowledge

>

Greater Than

SYN

Synchronous Idle

?

Question Mark

ETB

End of Transmission Block

@

Commercial At

CAN

Cancel

A...Z

Uppercase Latin Letters

EM

End of Medium

[ ]

Opening, Closing Bracket

SUB

Substitute

\

Reverse Slant

ESC

Escape

^

Circumflex

FS

File Separator

_

Underline

GS

Group Separator

Opening Single Quotation Mark (Grave Accent)

RS

Record Separator

a...z

Lowercase Latin Letters

US

Unit Separator

{ }

Opening, Closing Braces

DEL

Delete

|

Vertical Line (EBCDIC only)

 

 

~

Tilde

 

 

Cent (IBM Extension)

 

 

Logical Not (IBM Extension)

 

 

|

Logical Or (IBM Extension)