ITEM: AE3987L
ASCII to EBCDIC character conversions
Env:
AIX 3.2.5
Desc:
Customer has a third party application (Cobol) that writes
ASCII records to a file and wants each record to end with a
EBCDIC value 0x15 (Hex value in EBCDIC) What is the correct
ASCII value that will give this??
Action:
From the table below the correct value is this:
Dec: 133 Hex: 0x85
I used the first table "dd conv=ebcdic conversion" To get this
information.
DD CONVERSION TABLES FOR CONV=EBCDIC AND CONV=IBM
The following are the conversion tables for the dd command.
In the first two tables, the outside numbers are in decimal
and represent the ASCII character. The inside numbers are
in hex and represent the EBCDIC character. In the last
table, the outside numbers represent the EBCDIC character
and the inside numbers represent the ASCII character.
For example, the \^ (carat) character in ASCII is decimal 94.
So, according to the following charts, the ebcdic conversion
will produce character 9A; the ibm conversion will produce 5F.
dd conv=ebcdic conversion:
Out side numbers are DEC values that represent ACSII values
Inside are HEX values that represent EBCDIC values
0 1 2 3 4 5 6 7 8 9
---------------------------------------------------
0 | 0 | 1 | 2 | 3 | 37 | 2D | 2E | 2F | 16 | 5 |
10 | 25 | B | C | D | E | F | 10 | 11 | 12 | 13 |
20 | 3C | 3D | 32 | 26 | 18 | 19 | 3F | 27 | 1C | 1D |
30 | 1E | 1F | 40 | 5A | 7F | 7B | 5B | 6C | 50 | 7D |
40 | 4D | 5D | 5C | 4E | 6B | 60 | 4B | 61 | F0 | F1 |
50 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | 7A | 5E |
60 | 4C | 7E | 6E | 6F | 7C | C1 | C2 | C3 | C4 | C5 |
70 | C6 | C7 | C8 | C9 | D1 | D2 | D3 | D4 | D5 | D6 |
80 | D7 | D8 | D9 | E2 | E3 | E4 | E5 | E6 | E7 | E8 |
90 | E9 | AD | E0 | BD | 9A | 6D | 79 | 81 | 82 | 83 |
100 | 84 | 85 | 86 | 87 | 88 | 89 | 91 | 92 | 93 | 94 |
110 | 95 | 96 | 97 | 98 | 99 | A2 | A3 | A4 | A5 | A6 |
120 | A7 | A8 | A9 | C0 | 4F | D0 | 5F | 7 | 20 | 21 |
130 | 22 | 23 | 24 | 15 | 6 | 17 | 28 | 29 | 2A | 2B |
140 | 2C | 9 | A | 1B | 30 | 31 | 1A | 33 | 34 | 35 |
150 | 36 | 8 | 38 | 39 | 3A | 3B | 4 | 14 | 3E | E1 |
160 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 51 |
170 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 62 | 63 |
180 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 |
190 | 74 | 75 | 76 | 77 | 78 | 80 | 8A | 8B | 8C | 8D |
200 | 8E | 8F | 90 | 6A | 9B | 9C | 9D | 9E | 9F | A0 |
210 | AA | AB | AC | 4A | AE | AF | B0 | B1 | B2 | B3 |
220 | B4 | B5 | B6 | B7 | B8 | B9 | BA | BB | BC | A1 |
230 | BE | BF | CA | CB | CC | CD | CE | CF | DA | DB |
240 | DC | DD | DE | DF | EA | EB | EC | ED | EE | EF |
250 | FA | FB | FC | FD | FE | FF | | | | |
---------------------------------------------------
dd conv=ibm conversion:
Out side numbers are DEC values that represent ACSII values
Inside are HEX values that represent EBCDIC values
0 1 2 3 4 5 6 7 8 9
---------------------------------------------------
0 | 0 | 1 | 2 | 3 | 37 | 2D | 2E | 2F | 16 | 5 |
10 | 25 | B | C | D | E | F | 10 | 11 | 12 | 13 |
20 | 3C | 3D | 32 | 26 | 18 | 19 | 3F | 27 | 1C | 1D |
30 | 1E | 1F | 40 | 5A | 7F | 7B | 5B | 6C | 50 | 7D |
40 | 4D | 5D | 5C | 4E | 6B | 60 | 4B | 61 | F0 | F1 |
50 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | 7A | 5E |
60 | 4C | 7E | 6E | 6F | 7C | C1 | C2 | C3 | C4 | C5 |
70 | C6 | C7 | C8 | C9 | D1 | D2 | D3 | D4 | D5 | D6 |
80 | D7 | D8 | D9 | E2 | E3 | E4 | E5 | E6 | E7 | E8 |
90 | E9 | AD | E0 | BD | 5F | 6D | 79 | 81 | 82 | 83 |
100 | 84 | 85 | 86 | 87 | 88 | 89 | 91 | 92 | 93 | 94 |
110 | 95 | 96 | 97 | 98 | 99 | A2 | A3 | A4 | A5 | A6 |
120 | A7 | A8 | A9 | C0 | 4F | D0 | A1 | 7 | 20 | 21 |
130 | 22 | 23 | 24 | 15 | 6 | 17 | 28 | 29 | 2A | 2B |
140 | 2C | 9 | A | 1B | 30 | 31 | 1A | 33 | 34 | 35 |
150 | 36 | 8 | 38 | 39 | 3A | 3B | 4 | 14 | 3E | E1 |
160 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 51 |
170 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 62 | 63 |
180 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 |
190 | 74 | 75 | 76 | 77 | 78 | 80 | 8A | 8B | 8C | 8D |
200 | 8E | 8F | 90 | 9A | 9B | 9C | 9D | 9E | 9F | A0 |
210 | AA | AB | AC | AD | AE | AF | B0 | B1 | B2 | B3 |
220 | B4 | B5 | B6 | B7 | B8 | B9 | BA | BB | BC | BD |
230 | BE | BF | CA | CB | CC | CD | CE | CF | DA | DB |
240 | DC | DD | DE | DF | EA | EB | EC | ED | EE | EF |
250 | FA | FB | FC | FD | FE | FF | | | | |
---------------------------------------------------
dd conv=ascii conversion:
Outside values are EBCDIC values
Inside values are HEX values that represent ASCII values
0 1 2 3 4 5 6 7 8 9
---------------------------------------------------
0 | 0 | 1 | 2 | 3 | 9C | 9 | 86 | 7F | 97 | 8D |
10 | 8E | B | C | D | E | F | 10 | 11 | 12 | 13 |
20 | 9D | 85 | 8 | 87 | 18 | 19 | 92 | 8F | 1C | 1D |
30 | 1E | 1F | 80 | 81 | 82 | 83 | 84 | A | 17 | 1B |
40 | 88 | 89 | 8A | 8B | 8C | 5 | 6 | 7 | 90 | 91 |
50 | 16 | 93 | 94 | 95 | 96 | 4 | 98 | 99 | 9A | 9B |
60 | 14 | 15 | 9E | 1A | 20 | A0 | A1 | A2 | A3 | A4 |
70 | A5 | A6 | A7 | A8 | D5 | 2E | 3C | 28 | 2B | 7C |
80 | 26 | A9 | AA | AB | AC | AD | AE | AF | B0 | B1 |
90 | 21 | 24 | 2A | 29 | 3B | 7E | 2D | 2F | B2 | B3 |
100 | B4 | B5 | B6 | B7 | B8 | B9 | CB | 2C | 25 | 5F |
110 | 3E | 3F | BA | BB | BC | BD | BE | BF | C0 | C1 |
120 | C2 | 60 | 3A | 23 | 40 | 27 | 3D | 22 | C3 | 61 |
130 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | C4 | C5 |
140 | C6 | C7 | C8 | C9 | CA | 6A | 6B | 6C | 6D | 6E |
150 | 6F | 70 | 71 | 72 | 5E | CC | CD | CE | CF | D0 |
160 | D1 | E5 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 7A |
170 | D2 | D3 | D4 | 5B | D6 | D7 | D8 | D9 | DA | DB |
180 | DC | DD | DE | DF | E0 | E1 | E2 | E3 | E4 | 5D |
190 | E6 | E7 | 7B | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
200 | 48 | 49 | E8 | E9 | EA | EB | EC | ED | 7D | 4A |
210 | 4B | 4C | 4D | 4E | 4F | 50 | 51 | 52 | EE | EF |
220 | F0 | F1 | F2 | F3 | 5C | 9F | 53 | 54 | 55 | 56 |
230 | 57 | 58 | 59 | 5A | F4 | F5 | F6 | F7 | F8 | F9 |
240 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
250 | FA | FB | FC | FD | FE | FF | | | | |
---------------------------------------------------
Support Line: ASCII to EBCDIC character conversions ITEM: AE3987L
Dated: December 1994 Category: N/A
This HTML file was generated 99/06/24~13:30:29
Comments or suggestions?
Contact us