home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / m2toolz.zip / xlfile.tnl < prev   
Text File  |  1999-01-26  |  2KB  |  50 lines

  1. Here's an M2 file translator done in the El Cheapo manner.
  2. There are 2 translate tables that come with it for ASCII-to-EBCDIC
  3. and the inverse.  These haven't been tested or fooled with.  They've
  4. been 'borrowed' from mainframe tables.
  5.  
  6. For that kind of translate it's:
  7.  
  8.   XLFILE input-file output-file table-file
  9.  
  10. Input-file can == Output-file.
  11.  
  12. If the table-file is given as 'MAPPED', then the remaining command args
  13. are pairs of characters, either hex or as themselves, to be translated
  14. from and to.
  15.  
  16. For a DOS to UNIX cheapo text conversion:
  17.  
  18.   XLFILE input-file output-file MAPPED 0D 20
  19.  
  20. which gets an extra blank at the end of the line but removes the carr. return.
  21. or IBM ASCII vertical bar to ASCII vertical bar.
  22.  
  23.   XLFILE input-file output-file MAPPED B3 7C
  24.  
  25. If the table-file has no path indications (':', '/', or '\' ) then
  26. it is assumed to reside in the same directory as XLFILE.EXE.
  27.  
  28. For the Blue crowd, two (mutually exclusive) positional parameters are added
  29. called ATEXT or ETEXT which require a fixed record 'size' be specified.
  30. 'ATEXT' means the output is intended to be ASCII.  'ETEXT' means the
  31. output is intended to be EBCDIC.
  32. The ATEXT/ETEXT options are mutually exclusive with 'MAPPED'.
  33.  
  34. Exit codes:
  35.    1 - Less than 3 arguments to program.
  36.    2 - Translate table load failure.
  37.    3 - Input file load failure.
  38.    4 - Output file write error.
  39.    5 - Unable to open output file.
  40.    7 - Unpaired character definition.
  41.    9 - Invalid Hexadecimal character specified.
  42.   11 - Invalid record length argument.
  43.  
  44. The code has been repaired to handle files larger than a megabyte.
  45. There was a problem related to the use of DosSubAllocMem by the runtime
  46. which has been repaired.
  47.  
  48. If a complete path was specified for the translate file all xTEXT specs
  49. were ignored.
  50.