home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Rice_CMS / gopher24 / a2e.rexx next >
Encoding:
OS/2 REXX Batch file  |  1992-09-23  |  2.8 KB  |  68 lines

  1. /* ----------------------------------------------------------------- ╞CS
  2.  * ASCII to EBCDIC and vice-versa code conversion tables.
  3.  * Tables included here are based on ASCII conforming to the ISO8859-1
  4.  * Latin 1 character set and EBCDIC conforming to the IBM Code Page 37
  5.  * Latin 1 character set (except for three pairs of characters in 037).
  6.  *
  7.  *        Name: A2E REXX
  8.  *              CMS Pipelines filter to translate ASCII to EBCDIC
  9.  *      Author: Rick Troth, Rice University, I/S VM Systems Support
  10.  *        Date: 1992-Feb-27 for the filter, earlier for the table
  11.  *
  12.  *        Note:
  13.  *              These tables are provided in source form so that you
  14.  *              may modify them locally.  I recommend that you not
  15.  *              modify them just to make things look right on your
  16.  *              screen.  If you have an older terminal and there are
  17.  *              not more than a dozen code-points that are wrong,
  18.  *              then you're better off using CODEPAGE EXEC to set the
  19.  *              CMS INPUT/OUTPUT translate tables.   GOPHER EXEC
  20.  *              *does respect*  CMS' translate tables.
  21.  */
  22.  
  23.     i =      '000102030405060708090A0B0C0D0E0F'x
  24.     i = i || '101112131415161718191A1B1C1D1E1F'x
  25.     i = i || '202122232425262728292A2B2C2D2E2F'x
  26.     i = i || '303132333435363738393A3B3C3D3E3F'x
  27.     i = i || '404142434445464748494A4B4C4D4E4F'x
  28.     i = i || '505152535455565758595A5B5C5D5E5F'x
  29.     i = i || '606162636465666768696A6B6C6D6E6F'x
  30.     i = i || '707172737475767778797A7B7C7D7E7F'x
  31.     i = i || '808182838485868788898A8B8C8D8E8F'x
  32.     i = i || '909192939495969798999A9B9C9D9E9F'x
  33.     i = i || 'A0A1A2A3A4A5A6A7A8A9AAABACADAEAF'x
  34.     i = i || 'B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF'x
  35.     i = i || 'C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF'x
  36.     i = i || 'D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF'x
  37.     i = i || 'E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF'x
  38.     i = i || 'F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF'x
  39.  
  40.     e =      '00010203372D2E2F1605250B0C0D0E0F'x
  41.     e = e || '101112133C3D322618193F271C1D1E1F'x
  42.     e = e || '405A7F7B5B6C507D4D5D5C4E6B604B61'x
  43.     e = e || 'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'x
  44.     e = e || '7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'x
  45.     e = e || 'D7D8D9E2E3E4E5E6E7E8E9ADE0BD5F6D'x
  46.     e = e || '79818283848586878889919293949596'x
  47.     e = e || '979899A2A3A4A5A6A7A8A9C04FD0A107'x
  48.     e = e || '202122232415061728292A2B2C090A1B'x
  49.     e = e || '30311A333435360838393A3B04143EFF'x
  50.     e = e || '41AA4AB19FB26AB5BBB49A8AB0CAAFBC'x
  51.     e = e || '908FEAFABEA0B6B39DDA9B8BB7B8B9AB'x
  52.     e = e || '6465626663679E687471727378757677'x
  53.     e = e || 'AC69EDEEEBEFECBF80FDFEFBFCBAAE59'x
  54.     e = e || '4445424643479C485451525358555657'x
  55.     e = e || '8C49CDCECBCFCCE170DDDEDBDC8D8EDF'x
  56.  
  57. /* ----------------------------------------------------------------- A2E
  58.  * Translate ASCII to EBCDIC.
  59.  */
  60. 'READTO LINE'
  61. Do While rc = 0
  62.     'OUTPUT' Translate(line,e,i)
  63.     'READTO LINE'
  64.     End  /*  Do  While  */
  65.  
  66. Exit
  67.  
  68.