Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASCII and EBCDIC
Message
From
16/04/1999 09:25:45
 
 
To
16/04/1999 08:59:56
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00208933
Message ID:
00208946
Views:
25
>Hi everyone,
>
>I am using VFP 6.0 and a communication software to connect to a mainframe from PC. I need to convert outgoing messages to EBCDIC and the incoming ones to ASCII. Is there a way to do this in VFP? Is there a utility or add-on I can use to do this sort of thing?
>

The easiest thing to do would be to create a map between the ASCII character set and the EBCDIC character set and use CHRTRAN() to substitute values accordingly. CHRTRAN() works by substituting characters in matching positions in two strings. A simple example:

cFromString = 'ABCDE'
cToString = '12345'
? CHRTRAN('BAD',cFromString,cToString) && prints '214'

>Any ideas are appreciated.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform