Software:Code page 37

From HandWiki
Short description: EBCDIC character encoding including the ISO/IEC 8859-1 repertoire
EBCDIC 037
MIME / IANAIBM037
Alias(es)cp037, ebcdic-cp-us, ebcdic-cp-ca, ebcdic-cp-wt, ebcdic-cp-nl, csIBM037[1]
ClassificationEBCDIC
Transforms / EncodesISO/IEC 8859-1
Other related encoding(s)EBCDIC 37-2, 500, 924, 1047, 1140

Code page 37 (CCSID 37; label IBM037),[1] known as "USA/Canada - CECP", is an EBCDIC code page used on IBM mainframes. It encodes the ISO/IEC 8859-1 repertoire of graphic characters.

Code page 37 is one of the most-used and best-supported EBCDIC code pages. It is used as the default z/OS code page in the United States and other English speaking countries.[2] It is considered the "required" EBCDIC code page for the United States,[3] and also used in Australia , New Zealand, the Netherlands, Portugal and Brazil , and on ESA/390 systems in Canada ,[4] but not on Canadian AS/400 systems, which use Code page 500 instead.[5] It is one of four EBCDIC code pages (alongside 500, 875 and 1026) with mapping data supplied by Microsoft to the Unicode Consortium,[6] and one of seven (alongside 273, 424, 500, 875, 1026 and 1140) supported by Python as standard.[7]

Character set

Code page 37 exists in two versions:[8]:5·2 a "base character set" or "DP94" version (GCSGID 101 with CPGID 37, or CCSID 8229), containing only 94 graphical characters (plus the space and control codes),[9][8]:5·15 and a "CECP" (Country Extended Code Page) version (GCSGID 697 with CPGID 37, or CCSID 37) with expansions to support the entire ISO/IEC 8859-1 repertoire.[4][8][10]:5·17

Code page 37[11][12][8]
0 1 2 3 4 5 6 7 8 9 A B C D E F
NUL SOH STX ETX SEL  HT  RNL DEL  GE  SPS RPT  VT   FF   CR   SO   SI  
DLE DC1 DC2 DC3 RES/
ENP
 NL    BS  POC CAN  EM  UBS CU1  IFS  IGS  IRS IUS/
ITB
 DS  SOS  FS  WUS BYP/
INP
 LF  ETB ESC  SA  SFE  SM/
SW
CSP MFA ENQ ACK BEL
SYN   IR   PP  TRN NBS EOT SBS   IT  RFF CU3 DC4 NAK SUB
 SP  NBSP â
00E2
ä
00E4
à
00E0
á
00E1
ã
00E3
å
00E5
ç
00E7
ñ
00F1
¢
00A2
.
002E
<
003C
(
0028
+
002B
|
007C
&
0026
é
00E9
ê
00EA
ë
00EB
è
00E8
í
00ED
î
00EE
ï
00EF
ì
00EC
ß
00DF
!
0021
$
0024
*
002A
)
0029
;
003B
¬
00AC
-
002D
/
002F
Â
00C2
Ä
00C4
À
00C0
Á
00C1
Ã
00C3
Å
00C5
Ç
00C7
Ñ
00D1
¦
00A6
,
002C
%
0025

005F
>
003E
?
003F
ø
00F8
É
00C9
Ê
00CA
Ë
00CB
È
00C8
Í
00CD
Î
00CE
Ï
00CF
Ì
00CC
`
0060
:
003A
#
0023
@
0040
'
0027
=
003D
"
0022
Ø
00D8
a
0061
b
0062
c
0063
d
0064
e
0065
f
0066
g
0067
h
0068
i
0069
«
00AB
»
00BB
ð
00F0
ý
00FD
þ
00FE
±
00B1
°
00B0
j
006A
k
006B
l
006C
m
006D
n
006E
o
006F
p
0070
q
0071
r
0072
ª
00AA
º
00BA
æ
00E6
¸
00B8
Æ
00C6
¤
00A4
µ
00B5
~
007E
s
0073
t
0074
u
0075
v
0076
w
0077
x
0078
y
0079
z
007A
¡
00A1
¿
00BF
Ð
00D0
Ý
00DD
Þ
00DE
®
00AE
^
005E
£
00A3
¥
00A5
·
00B7
©
00A9
§
00A7

00B6
¼
00BC
½
00BD
¾
00BE
[
005B
]
005D
¯
00AF
¨
00A8
´
00B4
×
00D7
{
007B
A
0041
B
0042
C
0043
D
0044
E
0045
F
0046
G
0047
H
0048
I
0049
SHY ô
00F4
ö
00F6
ò
00F2
ó
00F3
õ
00F5

007D}
J
004A
K
004B
L
004C
M
004D
N
004E
O
004F
P
0050
Q
0051
R
0052
¹
00B9
û
00FB
ü
00FC
ù
00F9
ú
00FA
ÿ
00FF
\
005C
÷
00F7
S
0053
T
0054
U
0055
V
0056
W
0057
X
0058
Y
0059
Z
005A
²
00B2
Ô
00D4
Ö
00D6
Ò
00D2
Ó
00D3
Õ
00D5
0
0030
1
0031
2
0032
3
0033
4
0034
5
0035
6
0036
7
0037
8
0038
9
0039
³
00B3
Û
00DB
Ü
00DC
Ù
00D9
Ú
00DA
 EO 
  CECP additions not part of the base set.

Pre-1986 version

The CECP code pages, including code page 37, were modified in 1986.[13] The post-1986 version is sometimes referred to as code page 37 "version 1"[14] ("037/1"),[8]:5·17 while the previous version is referred to as code page 37 "version 0",[14][15] or alternatively as code page 1070.[15] Four positions differ between version 1 and version 0.[14] These 1986 modifications brought the CECP character repertoire in sync with ISO 8859-1.[10] The changes affect only the CECP expansions; the 94-character base set is unchanged between both versions.

The differing portion of the older version is shown below; the remainder is the same as the current code page 37. The character at 0xE1 is a numeric (figure) space,[13][16] although it was also used as a mapping for the control code U+009F (Template:Ctrl in ECMA-48).[13]

Code page 37/0 (1070), bytes 0xB0–EF[16][17][10]
0 1 2 3 4 5 6 7 8 9 A B C D E F
^
005E
£
00A3
¥
00A5
·
00B7
ƒ
0192
§
00A7

00B6
¼
00BC
½
00BD
¾
00BE
[
005B
]
005D
¯
00AF
¨
00A8
´
00B4

2017
{
007B
A
0041
B
0042
C
0043
D
0044
E
0045
F
0046
G
0047
H
0048
I
0049
SHY ô
00F4
ö
00F6
ò
00F2
ó
00F3
õ
00F5

007D}
J
004A
K
004B
L
004C
M
004D
N
004E
O
004F
P
0050
Q
0051
R
0052
ı
0131
û
00FB
ü
00FC
ù
00F9
ú
00FA
ÿ
00FF
\
005C
FSP
2007
S
0053
T
0054
U
0055
V
0056
W
0057
X
0058
Y
0059
Z
005A
²
00B2
Ô
00D4
Ö
00D6
Ò
00D2
Ó
00D3
Õ
00D5
  Differences from code page 37/1.

Code page translation

Since CP 037 contains all of the standard Latin-1 characters, it is possible to translate the character codes from the CP 037 charset to ISO 8859-1 character codes, so that translation back to the CP 037 charset is an exact value-preserving round-trip conversion. Likewise, half of the control character codes can be translated into their exact ASCII equivalents. If the remaining EBCDIC-only control characters are translated (arbitrarily) into the remaining unused ASCII codes points (hex 80 to 9F) as well, the resulting translation covers all of the 256 character code points. Such a translation table is shown below:

CP 037 → ISO 8859-1
  _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F
0_ 00 01 02 03 9C 09 86 7F 97 8D 8E 0B 0C 0D 0E 0F
1_ 10 11 12 13 9D 85 08 87 18 19 92 8F 1C 1D 1E 1F
2_ 80 81 82 83 84 0A 17 1B 88 89 8A 8B 8C 05 06 07
3_ 90 91 16 93 94 95 96 04 98 99 9A 9B 14 15 9E 1A
4_ 20 A0 E2 E4 E0 E1 E3 E5 E7 F1 A2 2E 3C 28 2B 7C
5_ 26 E9 EA EB E8 ED EE EF EC DF 21 24 2A 29 3B AC
6_ 2D 2F C2 C4 C0 C1 C3 C5 C7 D1 A6 2C 25 5F 3E 3F
7_ F8 C9 CA CB C8 CD CE CF CC 60 3A 23 40 27 3D 22
8_ D8 61 62 63 64 65 66 67 68 69 AB BB F0 FD FE B1
9_ B0 6A 6B 6C 6D 6E 6F 70 71 72 AA BA E6 B8 C6 A4
A_ B5 7E 73 74 75 76 77 78 79 7A A1 BF D0 DD DE AE
B_ 5E A3 A5 B7 A9 A7 B6 BC BD BE 5B 5D AF A8 B4 D7
C_ 7B 41 42 43 44 45 46 47 48 49 AD F4 F6 F2 F3 F5
D_ 7D 4A 4B 4C 4D 4E 4F 50 51 52 B9 FB FC F9 FA FF
E_ 5C F7 53 54 55 56 57 58 59 5A B2 D4 D6 D2 D3 D5
F_ 30 31 32 33 34 35 36 37 38 39 B3 DB DC D9 DA 9F

Variants and relation to other code pages

Several other code pages exist, which amount to code page 37 with a few characters swapped. In particular, code page 37 encodes the hard brackets ([]) at BAhex and BBhex, while other variants use other encodings for the hard brackets. For example, code page 1047 is a variant used by the MVS Open Systems compiler.[18] It differs from code page 37 in six positions: Ý and [ switch places, as do ¨ and ], placing the hard brackets at ADhex and BDhex; the caret and not sign also switch places[19][20] This encoding of the brackets was inherited from the 3270 display system.[21] Although IBM intends code page 1047 to be used to fulfil specific requirements only, and not as a replacement for code pages 37 and 500,[3] the subset of code page 1047 encoding the ASCII repertoire was used for the single-byte graphical codes in UTF-EBCDIC.[18]

A hybrid of code pages 37 and 1047 used in combination with code page 310 on the 3279 system has been acknowledged by SHARE, but not officially designated as a code page by IBM, and is sometimes referred to as code page 37-2 by transcoding software.[21] It mostly matches code page 1047, except that the caret and the not sign are inverted to match code page 37.[21][22]

Code page 500, known as "International EBCDIC",[5] "International Latin-1" or "International Number 5",[21] is the other major EBCDIC encoding for the ISO/IEC 8859-1 repertoire. It is used in Belgium, Switzerland and on AS/400 systems in Canada .[5] It is related to code page 37 and has the same repertoire, but differs in seven positions; in particular, it encodes [ and ] at 4Ahex and 5Ahex respectively, which are used for the cent sign (¢) and exclamation point (!) in code page 37. The caret (^) is also encoded at 5Fhex, similarly to code page 1047. The ¢ is encoded at B0hex, the ¬ at BAhex, the ! at 4Fhex and the pipe character (|) at BBhex.[23][24] Code page 500 is in turn related to the German code page 273, which swaps several character pairs in a manner corresponding to the differences between DRV8 and ISO/IEC 8859-1, resulting in placement of the hard brackets at 63hex and FChex.[25]

A variant of code page 37 with the euro sign () character added at the 9Fhex position, replacing the universal currency sign (¤) is code page 1140.[26][27] Similarly, code page 1148 makes the same change to code page 500,[28][29] and code page 1141 does so to code page 273.[30]

An EBCDIC code page with the ISO/IEC 8859-15 repertoire, including the euro sign, is code page 924; this is related to code page 1047 but with the ISO/IEC 8859-1 characters replaced with their ISO/IEC 8859-15 replacements, with ¢ and ¬ moved to their code page 500 locations at B0hex and BAhex respectively, and with Ý moved to 4Ahex.[31]

See also

References

  1. 1.0 1.1 IANA Character Sets, https://www.iana.org/assignments/character-sets/character-sets.xhtml 
  2. Stephens, David (2011), "Lost in Translation 1 - EBCDIC Code Pages", LongEx Mainframe Quarterly (Longpela Expertise), http://longpelaexpertise.com/ezine/LostinTranslation1.php 
  3. 3.0 3.1 "Code page identifiers—CPGID 1047". IBM. http://www-01.ibm.com/software/globalization/cp/cp01047.html. 
  4. 4.0 4.1 "Coded character set identifiers—CCSID 37". IBM. http://www-01.ibm.com/software/globalization/ccsid/ccsid37.html. 
  5. 5.0 5.1 5.2 "Coded character set identifiers—CCSID 500". IBM. http://www-01.ibm.com/software/globalization/ccsid/ccsid500.html. 
  6. "Mappings | Vendors | Microsoft | EBCDIC". Unicode Consortium. https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/EBCDIC/. 
  7. "codecs — Codec registry and base classes § Standard Encodings". Python Documentation. Python Software Foundation. https://docs.python.org/3/library/codecs.html#standard-encodings. 
  8. 8.0 8.1 8.2 8.3 8.4 "Chapter 5. 3270 Display Station and Printer Code Page Charts". 3174 Establishment Controller Character Set Reference. IBM. 1990. http://www.bitsavers.org/pdf/ibm/3174/GA27-3831-02_3174_Character_Set_Reference_199003.pdf#page=142. 
  9. "Coded character set identifiers—CCSID 8229". IBM. http://www-01.ibm.com/software/globalization/ccsid/ccsid8229.html. 
  10. 10.0 10.1 10.2 "iso8859.txt". Kermit project / Columbia University. http://www.columbia.edu/kermit/ftp/charsets/iso8859.txt. 
  11. Code Page CPGID 00037 (pdf), IBM, https://public.dhe.ibm.com/software/globalization/gcoc/attachments/CP00037.pdf 
  12. Code Page CPGID 00037 (txt), IBM, https://public.dhe.ibm.com/software/globalization/gcoc/attachments/CP00037.txt 
  13. 13.0 13.1 13.2 IBM (2018). "Character Data Representation Architecture (CDRA)". pp. 327. https://www.ibm.com/downloads/cas/G01BQVRV#page=327. 
  14. 14.0 14.1 14.2 "Code Pages (§ Version 1 vs Version 0)". IPDS and SCS Technical Reference. IBM. p. 375. https://public.dhe.ibm.com/printers/downloads/jp/manual/pdf/ipds_tech_ref.pdf#page=393. 
  15. 15.0 15.1 "Coded character set identifiers—CCSID 12325". IBM. http://www-01.ibm.com/software/globalization/ccsid/ccsid12325.html. 
  16. 16.0 16.1 Code Page CPGID 01070 (txt), IBM, https://public.dhe.ibm.com/software/globalization/gcoc/attachments/CP01070.txt 
  17. Code Page CPGID 01070 (pdf), IBM, https://public.dhe.ibm.com/software/globalization/gcoc/attachments/CP01070.pdf 
  18. 18.0 18.1 Umamaheswaran, V.S. (2002-04-16). "UTF-EBCDIC". https://www.unicode.org/reports/tr16/tr16-8.html. 
  19. "ibm-1047". Converter Explorer. Unicode Consortium. https://icu4c-demos.unicode.org/icu-bin/convexp?conv=ibm-1047. 
  20. "Code page 1047". IBM. http://www-03.ibm.com/systems/resources/systems_i_software_globalization_pdf_cp01047z.pdf. 
  21. 21.0 21.1 21.2 21.3 xlate - Transliterate Contents of Records, IBM Corporation, 2010, http://vm.marist.edu/%7Epipeline/bhelp/ACH0275.html, retrieved 2016-10-18 
  22. "x3270 Character Set". x3270 Documentation. http://x3270.bgp.nu/Charset.html. 
  23. "ibm-500". Converter Explorer. Unicode Consortium. https://icu4c-demos.unicode.org/icu-bin/convexp?conv=ibm-500. 
  24. "Code page 500". IBM. http://www-03.ibm.com/systems/resources/systems_i_software_globalization_pdf_cp00500z.pdf. 
  25. "ibm-273". Converter Explorer. Unicode Consortium. https://icu4c-demos.unicode.org/icu-bin/convexp?conv=ibm-273. 
  26. "ibm-1140". Converter Explorer. Unicode Consortium. https://icu4c-demos.unicode.org/icu-bin/convexp?conv=ibm-1140. 
  27. "Code page 1140". IBM. https://public.dhe.ibm.com/software/globalization/gcoc/attachments/CP01140.pdf. 
  28. "ibm-1140". Converter Explorer. Unicode Consortium. https://icu4c-demos.unicode.org/icu-bin/convexp?conv=ibm-1140. 
  29. "Code page 1148". IBM. http://www-03.ibm.com/systems/resources/systems_i_software_globalization_pdf_cp01148z.pdf. 
  30. "ibm-1141". Converter Explorer. Unicode Consortium. https://icu4c-demos.unicode.org/icu-bin/convexp?conv=ibm-1141. 
  31. "Code page 924". IBM. http://www-03.ibm.com/systems/resources/systems_i_software_globalization_pdf_cp00924z.pdf. 

External links