Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASCII and EBCDIC
Message
De
16/04/1999 09:25:45
 
 
À
16/04/1999 08:59:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00208933
Message ID:
00208946
Vues:
24
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform