home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Rice_CMS / gopher24 / tcpe2a.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1993-01-05  |  1.8 KB  |  57 lines

  1. /*
  2.  *        Name: TCPE2A REXX
  3.  *              CMS Pipelines filter to translate EBCDIC to ASCII
  4.  *              basing translation on VM TCP/IP supplied tables
  5.  *      Author: Rick Troth, Rice University, Information Systems
  6.  *        Date: 1992-Apr-27, 1993-Jan-05
  7.  */
  8.  
  9. Parse Upper Arg table . '(' .
  10.  
  11. If table = "" Then table = "STANDARD"
  12. 'CALLPIPE DISK' table 'TCPXLBIN | STEM XLT.'
  13.  
  14. /*  if specified table is unavailable,  fall back to default  */
  15. If xlt.0 < 3 Then Do
  16.     'CALLPIPE *: | E2A | *:'
  17.     Exit rc
  18.     End  /*  If  ..  Do  */
  19.  
  20. /*
  21.  * variables:
  22.  *              xlt.0   should be "3",  meaning three records read
  23.  *              xlt.1   should be a comment
  24.  *              xlt.2   should be our ASCII ---> EBCDIC table
  25.  *              xlt.3   should be our EBCDIC ---> ASCII table
  26.  *              i       is set to the dummy input table
  27.  */
  28.  
  29.     i =      '000102030405060708090A0B0C0D0E0F'x
  30.     i = i || '101112131415161718191A1B1C1D1E1F'x
  31.     i = i || '202122232425262728292A2B2C2D2E2F'x
  32.     i = i || '303132333435363738393A3B3C3D3E3F'x
  33.     i = i || '404142434445464748494A4B4C4D4E4F'x
  34.     i = i || '505152535455565758595A5B5C5D5E5F'x
  35.     i = i || '606162636465666768696A6B6C6D6E6F'x
  36.     i = i || '707172737475767778797A7B7C7D7E7F'x
  37.     i = i || '808182838485868788898A8B8C8D8E8F'x
  38.     i = i || '909192939495969798999A9B9C9D9E9F'x
  39.     i = i || 'A0A1A2A3A4A5A6A7A8A9AAABACADAEAF'x
  40.     i = i || 'B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF'x
  41.     i = i || 'C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF'x
  42.     i = i || 'D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF'x
  43.     i = i || 'E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF'x
  44.     i = i || 'F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF'x
  45.  
  46. /* ----------------------------------------------------------------- E2A
  47.  * Translate EBCDIC to ASCII.
  48.  */
  49. 'READTO LINE'
  50. Do While rc = 0
  51.     'OUTPUT' Translate(line,xlt.3,i)
  52.     'READTO LINE'
  53.     End  /*  Do  While  */
  54.  
  55. Exit
  56.  
  57.