RFC 338
EBCDIC/ASCII Mapping for Network RJE
RFC 338 ๐ฎ EBCDIC/ASCII Mapping for Network RJE ๐ฆ
Network Working Group ๐ Request for Comments: 338 NIC: 9931 Author: R.T. Braden, UCLA/CCN ๐ Date: 17 May 1972 ๐
Okay bestie, here's the tea. This RFC is by R.T. Braden from UCLA/CCN, dated 17 May 1972, and it's about EBCDIC/ASCII mapping for Network RJE. The original title block doesn't list a category, and it doesn't say it obsoletes or updates anything, so there's nothing to report there. โจ
A. INTRODUCTION ๐ธ
Okay so, under NETRJS [1] and CCN's Network rje protocol [2], a virtual remote batch terminal can be either EBCDIC or ASCII. CCN runs an IBM 360/91, which does all of its regular processing in EBCDIC. When a virtual ASCII terminal signs onto NETRJS, CCN translates the "card reader" stream into EBCDIC and translates the "printer" stream back into ASCII [3]. ๐จ๏ธ
Over the last few months, a bunch of ASCII hosts (RAND PDP-10, Utah PDP-10, Illinois PDP-11) have finished user processes for NETRJS. Several users at those sites pointed out problems with the ASCII/EBCDIC mapping rules that were first put into NETRJS. Their complaints were totally valid, so we changed the existing mapping and added a new one. ๐
This RFC has three goals:
- (1) to make all users of NETRJS aware of the changed ASCII mapping
- (2) to call this problem to the attention of the Network RJE Protocol Committee
- (3) to knowledge and support Joel Winett's pioneering work [4] in this area. ๐ง
THE EBCDIC CHIMERA ๐ฆ
Okay, a year ago Joel Winett published RFC #183, which had the results of his careful research into what EBCDIC really means. He basically sounded a clarion call for every EBCDIC site to help define a Network standards mapping. At the time, though, we at CCN were super busy implementing NETRJS for an EBCDIC user site, RAND, so honestly we weren't very supportive of his efforts. Oops. ๐
RFC #183 is a valuable document, and we hope a copy ends up in the hands of Armonk. ๐ค From RFC #183 it's clear that EBCDIC is a standard ("basic") set of characters, plus a bunch of overlapping ad-hoc character happenings. The good news is that if we ignore special-purpose text composition programs, IBM 360 programs only use the 89 "basic" EBCDIC graphics [5] shown in RFC #183 and in Figure 1. An IBM 029 "EBCDIC" keypunch can make 63 graphics: the 89 basic EBCDIC graphics minus the 26 lower case letters. OS/360 actually needs an even smaller subset, 60 characters commonly called the "PL/1 character set." The PL/1 set is the 89 basic graphics minus the 26 lower case letters, and also minus the three graphics <cent sign>!" (cent sign, exclamation point, and quotation). ๐
C. CHARACTER MAPPING IN NETRJS ๐
Now let's look at what we need from an ASCII/EBCDIC mapping for NETRJS, or really any rje protocol. The requirements are:
- Efficiency: The translation should be character-to-character, so that the CPU operation "translate" can be used and character scans obviated. This is important because a significant volume of character data may be moved during rje operations. ๐๏ธ
- Usability:
- (1) All of the 89 EBCDIC graphics should be mapped into corresponding ASCII characters.
- (2) The mapping should be as nearly transparent as possible, i.e., whenever the same graphic appears in both sets, it should map onto itself.
- (3) To minimize the adaptation required of an EBCDIC-oriented programmer, the ASCII graphics should evoke the corresponding EBCDIC graphic, when they are not identical. ๐
These thoughts led us to bring Winett's rules II (a) and III (b) (see page 4 of the RFC #183) into NETRJS:
ASCII EBCDIC
----- ------
| |
~ <bent bar>
\ <cent sign>
This defines all 89 basic EBCDIC graphics in terms of ASCII. ๐ However, there's still the question of how to map the 6 "maverick" ASCII characters ( []{}^` ), which are neither in EBCDIC nor in the list above. ๐ค
We could have (and did) decided that all CCN users only write and run normal 360 programs in EBCDIC, and that they'd only type one of the maverick ASCII graphics by mistake. So our original choice was to map the mavericks in the input to EBCDIC question marks. We also assumed that if a user needed a bigger subset of EBCDIC than the basic 89, they'd do their rje directly in EBCDIC. ๐
We now realize there were two deficiencies in the original mapping rules:
- The 360 program might be meant to manipulate ASCII text from the Network. In that case, the Network user needs every ASCII character, including the mavericks, uniquely mapped into EBCDIC in some (standard) way.
- The current mapping is only convenient if a user at an AT&T Model 33/35 Teletype (or a simulator of one) needs a different mapping to be easy to use.
For the first case, we changed the mapping of the 6 maverick ASCII characters from "?", and now use Winett's rules III (c) and III (d) instead:
ASCII EBCDIC
----- ------
[ X'AD'
] X'BD'
{ X'8B'
} X'9B'
^ X'71'
` X'79'
For the folks with a Model 33/35 Teletype, we've added "TTY" to the list of virtual remote batch terminal types, alongside "ASCII" and "EBCDIC". ๐จ๏ธ A user sets their virtual remote batch terminal to type TTY either by doing their initial ICP to socket 15 (vs. 11 for EBCDIC, 13 for ASCII), or by doing an ICP to Socket 1 and entering the command "TTYRJS" (vs. "RJS" for EBCDIC, "ARJS" for ASCII). The mapping NETRJS uses for a TTY remote is:
Model 33 Corresponding
Graphic ASCII EBCDIC
-------- ------------- ------
\ \ <bent bar>
<up arrow> ^ |
<left arrow> _ _
[ [ <cent sign>
] ] X'BD'
Honestly? It's ugly, but it's probably the best we can do. ๐ซ
D. CONCLUSIONS ๐
It's obvious that one pair of translation tables won't cut it. NETRJS needs (at least) two mappings for each direction. How long until an important set of users shows up with a different terminal character set, needing yet another mapping? [6] An rje server site needs to be ready to offer a variety of translation tables, and maybe let a user specify their own table(s). This mini-subset of "Date Reconfiguration Service" might be necessary to prevent translation-table-proliferation. ๐ In Network discussions, the tendency has been to put the burden on user sites to adapt to different conventions. In the real world of users and servers, though, the server will often have to do the adapting. ๐
NOTES AND REFERENCES ๐
[1] R.T. Braden, Interim NETRJS Specifications, RFC #189 (NIC
#7133), July 15, 1971.
[2] Please note that "RJS" is the proper name of a particular rje
package written at CCN the generic name for remote batch
service is "rje".
[3] Notice that the mapping question discussed in this RFC is
significant only for the virtual card reader and printer
connections in NETRJS. The punch connection is always
transparent, i.e., never translated. The remote operator
connections use the extended EBCDIC/ASCII mapping including
the maverick characters, but this is not important since
operator commands require only a limited character set.
[4] Joel Winett, "_The_ EBCDIC Codes and their Mapping to ASCII",
RFC #183 (NIC #7127), July 21, 1971.
[5] Winett lists only 88 basic EBCDIC graphics, excluding the
space which he regards as a control character. This is a
matter of taste, but we find it less confusing to include the
space as a graphic.
[6] CCN recently received a new Teletype-replacement terminal.
This machine has a bastardized graphic character set -- mostly
ASCII, with a sprinkling of both (!) EBCDIC and TTY.
Figure 1 is the chart of the character sets everyone keeps mixing up. ๐
+-------------------------------------+
| Full ASCII |
| a b ... z | ` ^ { } ~ |
| |
+-----+-------------------------------------+--------------+
|33/35| | AT&T TWX |
| | ` [ ] | (Mod 33/35 |
| | | tty) |
+------+-----+------+-----------------------+ | |
|Basic | | | | | |
|EBCDIC| | | <SP> | | |
| | | " | A B ... Z | | <left arrow> |
| | | ! | 0 1 ... 9 | | |
| | | | + - * / ( ) | | <up arrow> |
| | | | . , ' = | | |
| | | | $ & | | |
| | | | < > : ? % # @ | | |
| | | | | | |
| +-----+------+-----------------------+------+--------------+
| | | | |
| | | _ | |
| | | | |
| +------+-----------------------+------+
| | |
| | PL/1 <bent bar> | |
| | Set |
| +-----------------------+
| <cent sign> |
| Basic EBCDIC |
+-------------------------------------------+
Figure 1. Character Sets Commonly Abused
[This RFC is also available in .PS and .PDF format.]
[This RFC was put into machine readable form for entry] [into the online RFC archives by Helene Morin, Viagenie, 12/99]
๐ฆ where this page comes from
- ietf: rfc338 1972-05
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms