Information générale
Catégorie:
Produits tierce partie
>> 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.
Thanks for that Dragan,
We thought it would be something like what you have written above,
but we had not purchesed a communication product yet and as such, we would prefer to purchase something that would do most of the job from the start and not require us to code around problems that another products features will already take care of.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement