======================= ascii2ebcdic ======================= This package is available for download from my web site at http://sb.fluomedia.org/download/ What does it do: ---------------- This package contains a pair of complementary filters for converting from ASCII to EBCDIC and vice-versa in a REVERSIBLE way WITHOUT LOSS of information. The package supports different EBCDIC code pages, e.g. for OS/390 and BS2000. Input comes from standard input, output goes to standard output. Both can be redirected to/from files using the corresponding redirection operators (">", ">>" and "<", respectively). These filters can therefore be used on any platform that provides a standard ANSI C compiler and where redirection of standard input/output is possible. Available command line options are: -v reverse the conversion (use inverse translation table) -o use the EBCDIC code page for OS/390 (DEFAULT) -b use the EBCDIC code page for BS2000 -n "neutral" or "no operation" - simply pass through all characters (overrides "-v", "-o" and "-b") -vo use OS/390 EBCDIC code page, reverse conversion -ov use OS/390 EBCDIC code page, reverse conversion -vb use BS2000 EBCDIC code page, reverse conversion -bv use BS2000 EBCDIC code page, reverse conversion -rev reverse the conversion -os3 use OS/390 EBCDIC code page (DEFAULT) -bs2 use BS2000 EBCDIC code page -nop simply pass through all characters -dump dump the internal translation table (can be combined with "-v" or "-rev" to dump the inverse translation table) instead of performing any conversion (override) -init initialize the translation table first before dumping it (this option has no effect if "-dump" is not present) The last options on the command line take precedence over the first ones, where applicable. "-v" and "-rev" are toggle switches, i.e., specifying this option twice is the same as not specifying it at all. How to build and install: ------------------------- Just compile the two "*.c" files in this package with your favourite ANSI C compiler, for instance: > gcc -ansi -O2 -o ascii2ebcdic ascii2ebcdic.c > gcc -ansi -O2 -o ebcdic2ascii ebcdic2ascii.c Then copy the resulting binaries to some directory in your search path ("/usr/local/bin" or "C:\DOS", for example). If you don't want to type so many options, you can also use > perl compile.pl ascii2ebcdic (all platforms) > perl compile.pl ascii2ebcdic (all platforms) > ./compile.sh ascii2ebcdic (UNIX) > ./compile.sh ebcdic2ascii (UNIX) > compile ascii2ebcdic (DOS/WinNT/95) > compile ebcdic2ascii (DOS/WinNT/95) instead for compiling these two source files. Note that "compile.sh" assumes "gcc" to be your ANSI C compiler and "compile.bat" assumes "cl", whereas "compile.pl" uses the same compiler that Perl itself has been compiled with. Legal issues: ------------- This package with all its parts is Copyright (c) 2000 by Steffen Beyer. All rights reserved. This package is free software; you can redistribute it and/or modify it under the terms of the "GNU General Public License". Please refer to the file "GNU_GPL.txt" in this distribution for details! Author's note: -------------- I hope you will find this package beneficial! Share and enjoy! Yours, -- Steffen Beyer http://sb.fluomedia.org/ "There is enough for the need of everyone in this world, but not for the greed of everyone." - Mahatma Gandhi