> The mainframe character set isn't ASCII but rather ??EBCDIC??.
> Using binary mode transfer would not work unless the two character sets
> matched or a translator was written.
> It just seems that we could save a lot of heartache if we simply purchased
> a file transfer system with the capabilities we require instead of us
> having to write a translator.
>
> Brad
C'mon, the translator can be written in fox within one hour. I wrote one
in FP1.02 for sake of some data transfer. It simply takes one 256-byte
string and a sys(15) function, or two 256-byte strings and a ChrTran()
function. Open the source file low-level and read it in portions of,
say, 4K or so and write them into another file, like this:
in_handle=fopen(source_file)
out_handle=fcreate(dest_file)
do while !feof(in_handle)
buffer=fread(in_handle, 4096)
=fwrite(out_handle, chrtran(buffer, ebcd_string, ascii_string)
endd
close all
ascii_string should contain chr(0)+chr(1)+...+chr(255), ebcd_string
should contain corresponding characters in EBCDIC, or vice versa.