Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text file transfer using commtools
Message
From
15/06/1997 20:20:36
Brad Degroot
Ge Capital It Solutions
Melbourne, Australia
 
 
To
11/06/1997 15:36:11
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00035327
Message ID:
00036450
Views:
39
>> 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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform