>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.